Question

I'd like to know implementation/performance differences between Java SnappyFramedInputStream and SnappyInputStream, as well as best usage scenarios for each one of them. (Same for their OutputStream counterparts).

Thanks in advance!

Était-ce utile?

La solution

The functional difference is that SnappyInputStream is proprietary and SnappyFramedInputStream implements the framing format defined by google (as linked by @andres.santana).

From a performance perspective, I am going to guess that you are talking about the xerial snappy-java implementation (as I believe that is the only SnappyFramedInputStream that currently exists). The difference is that the framing format includes a crc32c checksum on every frame. The SnappyFramedInputStream allows the verification of this checksum to be disabled, which effectively nullifies any difference on a pure reading perspective.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top