free(bs->array);
free(bs);
}
+
+int bs_readblock(FILE *fp, char *data, Uint32 pagesize)
+{
+ Uint32 i=0;
+
+ while ((!feof(fp)) && (i < pagesize)) {
+ data[i++] = fgetc(fp);
+ }
+
+ /* Saco un EOF que lee de mas */
+ if (i<pagesize) i--;
+
+ return i;
+}
+