Skip to content

File offsets start with 1 and there's no way to override it #2

@ivant

Description

@ivant

For some reason, the printed file offsets start with 1 and not 0. There is the -o option that lets me add some value to the displayed offset at every line, but it is not responsible for the extra 1, as far as I could tell:

$ 0x test.1.xz
0x00000001:  fd377a58 5a000004 e6d6b446 02002101  |·7zXZ······F··!·|
0x00000011:  1c000000 10cf58cc 01000c48 656c6c6f  |······X····Hello|
0x00000021:  2c20776f 726c6421 00000000 c4775866  |, world!·····wXf|
0x00000031:  43e1598e 0001250d 7119c4b6 1fb6f37d  |C·Y···%·q······}|
0x00000041:  01000000 0004595a                    |······YZ········|

$ 0x -o 1 test.1.xz
0x00000002:  fd377a58 5a000004 e6d6b446 02002101  |·7zXZ······F··!·|
0x00000012:  1c000000 10cf58cc 01000c48 656c6c6f  |······X····Hello|
0x00000022:  2c20776f 726c6421 00000000 c4775866  |, world!·····wXf|
0x00000032:  43e1598e 0001250d 7119c4b6 1fb6f37d  |C·Y···%·q······}|
0x00000042:  01000000 0004595a                    |······YZ········|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions