@Override
public byte[] getBytes(Object obj) {
final LZ4Factory factory = lz4Factory.get();
byte[] data = codecUncompressed.getBytes(obj);
final int decompressedLength = data.length;
LZ4Compressor compressor = factory.fastCompressor();
int maxCompressedLength = compressor.maxCompressedLength(decompressedLength);
byte[] compressed = new byte[4 + maxCompressedLength];
compressor.compress(data, 0, decompressedLength, compressed, 4, maxCompressedLength);
return compressed;
}