Skip to content

Support gzip pcap files in pcapgo/read.go #213

@bramp

Description

@bramp

Wireshark will transparently decompress a gzip pcap file. pcapgo.NewReader should check if the first couple of bytes are 0x1f 0x8b, and if so wrap the io.Reader with a gzip.NewReader.

This will allow pcapgo to open compressed pcap files, and would be consistent with how wireshark's wiretap library does it https://github.com/wireshark/wireshark/blob/90e1232672446e79e75e5c6877310a49f23ae228/wiretap/file_wrappers.c#L575

Happy to send a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions