in winhex i am trying to locate data size of a bzip2 compressed file?

66 Views Asked by At

I am trying to find the compressed file size of a Bzip2 file in winhex but don't know how to do it, can anyone know how to find these things by looking at hex editor

i have tried checking the file of header i.e 42 5A 68 but still don't know what to do next?

1

There are 1 best solutions below

8
Romeo Ninov On

When you check the headers of bzip2 you will see first you have 4 bytes as header

BZh<0-9>  

then you have in BCD coded Pi number (6 bytes):

0x314159265359  

then CRC (4 bytes)
etc...

then it start Huffman encoded data stream (which by my understanding is the compressed data)

and at the end you have SQRT(Pi) in BCD (6 bytes)

0x177245385090

CRC (4 bytes)

and 0 to 7 bits padding (to whole byte)