Skip to content

Wrong offsets with ad-hoc encoding of the graph #166

@colobrodo

Description

@colobrodo

When I use the OffsetsWriter from another encoder based on Huffman, I end up with the wrong offsets. This is because the Huffman-based encoder writes a header at the start of the file to define the length of the codes, but the OffsetsWriter only accounts for the length of each encoded list and does not account for the header. This "shifts" all the resulting offsets back by the header size.
I can rebuild the offsets after compression, but I think this issue could easily be resolved by allowing the user to provide an extra parameter to the OffsetsWriter that specifies where the lists start in the file. This position would then be added to the first offset written.

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