I create my first real binary parser (tiff reader) and ask a question about how to allocate memory. I want to create a structure in my TiffSpec class for IFD records. These records will always be 12 bytes, but depending on the type specified in this particular record, the values ββat the end may have different types (or maybe just an address to another place in the file). What would be the best way to make such data? The smallest sized memory that I assume will have 1 byte.
source
share