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!

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top