in src/main/java/com/spotify/sparkey/CompressedOutputStream.java [84:96]
private int writeImpl(byte[] b, int off, int len) throws IOException {
int remaining = remaining();
if (len < remaining) {
System.arraycopy(b, off, uncompressedBuffer, pending, len);
pending += len;
return len;
} else {
System.arraycopy(b, off, uncompressedBuffer, pending, remaining);
pending = maxBlockSize;
flush();
return remaining;
}
}