eapache/go-xerial-snappy

Why xerialHeader first value is 130?

ferrirW opened this issue · 2 comments

I read code and found xerialHeader is []byte{130, 83, 78, 65, 80, 80, 89, 0}, the first value 130 was parse to -126 in Snappy-Java 1.1.2, that caused :
java.io.IOException: failed to read chunk
at org.xerial.snappy.SnappyInputStream.hasNextChunk(SnappyInputStream.java:416)

And i'm very curious about what the reason of this value setting is?
Thank you for your project, if you can reply to me, it will be great.

I don't remember. When I wrote it, that was the magic byte value that the Java version was expecting.

ok, understand.
Thanks for your reply.