}
private byte[] compress(byte[] data) throws Exception
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
LzmaOutputStream lzma = new LzmaOutputStream.Builder(out).useEndMarkerMode(true).build();
lzma.write(data);
lzma.close();
return out.toByteArray();
}