Re: MORE GOB file questions :)


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Dr. GrooveuX on March 17, 1998 at 17:53:21:

In Reply to: Re: GOB file questions posted by Stealth on March 17, 1998 at 17:24:43:

> A gob is just a binary file you can read in as records.
> 1. the main header record
> 2. the items records(filenames & offsets etc for the filedata inside)
> 3. file data records

> The directories are stored as filepaths in the item records.

> You need to read the main header (16 bytes) to get the number of files inside the gob
Ok, so the part the says GOB is ascii text? that occupies the first 3 bytes so i can skip it? then the gob version, that occupies one byte so i can jsut skip over it? and then the other numbers as type Long, i can just read those in as long integers?


> Then read 128 bytes for each file in the gob, This contains the filepath(name) size of file and starting offset from the begining of the file ( for each file inside of the gob)

so you could use a do(while) statement...

> Finally you position yourself at the offset and read the size in bytes for the file you want.
gotcha

Sorry about all this mass confusion, I'm just trying to get aquainted with reading binary files into my own programs. Just another skill I must master :).


Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]