Hi everybody.
I'm trying to build my own untar program, and I am unable to gather the file size from the tar.
I'm working on linux 2.6.11, with gcc.
According to
http://en.wikipedia.org/wiki/Tar_(file_format), the file size should be ascii encoded, and at offset d124 from the header.
But when I tar a file of 34 bytes, I read a file size of 42 bytes, which is incorrect.
Here is the hexa code (read with ghex2)
0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x34 0x32 0x00
which stand for (Ascii) 00000000042\0
And I have check with ls -l the size of my untared file, which is 34 bytes.
Does anybody has an idea ?
Thanks !