kaitoy / pcap4j

A Java library for capturing, crafting, and sending packets.
https://www.pcap4j.org/
Other
1.17k stars 309 forks source link

Please add support for reading gzipped pcap files #204

Open stephenc214 opened 5 years ago

stephenc214 commented 5 years ago

Or provide instructions on how the support might be added

kaitoy commented 5 years ago

A gzipped pcap file might be extracted into a temporary directory and then be read...

vslee commented 5 years ago

I would enjoy having this feature natively as well since it's cleaner to add reading a gzip stream from within your library than to extract into a temporary directory.

kaitoy commented 5 years ago

Pcap4J now uses a native method in libpcap to read and parse pcap files, and so we can't use Java's stream without implementing a pcap file parser ourselves, which would be a hard way.