Jump to content

Determine size of a ISO-file


JP RK

Recommended Posts

Hi all,

 

I have a question:

Is there a way to read the byte length of the ISO-File in the header of the iso-file (e.g. Volume Descriptors)? I try to read a iso-File from a flash (embedded microprocessor), and for this I need to know how many bytes the whole file has. It would be helpful if I couold read the size of it from the ISO header on a defined address...

 

thanks!

Link to comment
Share on other sites

Try reading the 'Volume Space Size' in the 'Primary Volume Descriptor'. It's 4 bytes long, starting at offset 0x080. The PVD is typically in sector 16 (check for at 1 in byte 0x000 and the 'CD001' signature at offset 0x001).

 Thank you!

 

'Volume Space Size' (on 0x050, not on 0x080!) = 1175 (decimal)

'Logical block size' = 2048 (decimal)

 

Volume Space Size is the number of Logical block in which the volume space is. So I multiply 'Volume Space Size' with 'Logical block size'.

 

My ISO has 2424832 Bytes, the result of the multiplication above is 2406400 Bytes. That's a different of 18432 Bytes = 9 Logical block. Is this offset of 9 Logical block a constant overhead? Do you know that?

Link to comment
Share on other sites

oops, my mistake! I knew what I meant ;) It's byte 80 (starting at 0) - the ecma-119 pdf shows the values as starting from 1 (so it's byte position 81) and that's what I (badly!) tried to make clearer.

 

What's in the 9 blocks at the end of that ISO? Just zeros? That number is only useful if it was right in the first place (and if other file systems are present, they could make it wrong). There should be no constant overhead, no. If there was, you'd kinda expect it to be 16 sectors worth (meaning it didn't include what's before the PVD).

 

The 9 is probably just rounding up the image size to a multiple of 16 sectors (1 ECC block).

Link to comment
Share on other sites

oops, my mistake! I knew what I meant ;) It's byte 80 (starting at 0) - the ecma-119 pdf shows the values as starting from 1 (so it's byte position 81) and that's what I (badly!) tried to make clearer.

 

What's in the 9 blocks at the end of that ISO? Just zeros? That number is only useful if it was right in the first place (and if other file systems are present, they could make it wrong). There should be no constant overhead, no. If there was, you'd kinda expect it to be 16 sectors worth (meaning it didn't include what's before the PVD).

 

The 9 is probably just rounding up the image size to a multiple of 16 sectors (1 ECC block).

 

Yes, there are just zeros in the last 9 blocks! To round up the image size make sense. I have checked a ISO generated by NERO, there the size of the iso-file is identical to the multiplication of 'Volume Space Size' and 'Logical block size' (and the size is not roundet to a multiple of 16 sectors!).

 

Thank you very much!

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.