This code should be improved so that we can use the internal buffer instead of using BufferredOutputStream: https://github.com/xerial/snappy-java/blob/develop/src/main/java/org/xerial/snappy/SnappyOutputStream.java#L275