質問

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!

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top