Skip to content

Is it possible to return raw file offsets from within the tar? #162

@jeroen

Description

@jeroen

I would like to generate an index of a tar file with the start and end offset of each file in the tarball, such that I can mmap or extract a single file later on. Is this possible with tar-stream?

The documentation of headers only mentions the size of each file, but I would also need the offset within the tar.

From hacking it looks like the global property extract._buffer.shifted contains what I need but this is mostly a guess. It would be nice if the header callback could include the offset property for each entry.

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