final int length = in.readableBytes();
final InputStream bbIn = new ByteBufInputStream(in);
final ByteBufOutputStream bbOut = new ByteBufOutputStream(out);
bbOut.writeByte(properties);
bbOut.writeInt(littleEndianDictionarySize);
bbOut.writeLong(Long.reverseBytes(length));
encoder.code(bbIn, bbOut, -1, -1, null);
bbIn.close();
bbOut.close();