如何在java中解压缩lzo压缩字节数组?

如何在java中解压缩lzo压缩字节数组?,java,arrays,lzo,Java,Arrays,Lzo,我是LZO压缩和解压缩新手。我正试着用它 输入信息: InputStream stream = new ByteArrayInputStream(src); int b1 = stream.read(); int b2 = stream.read(); int b3 = stream.read(); int b4 = stream.read(); int dstLength = ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4

我是LZO压缩和解压缩新手。我正试着用它

输入信息:

InputStream stream = new ByteArrayInputStream(src);
int b1 = stream.read();
int b2 = stream.read();
int b3 = stream.read();
int b4 = stream.read();
int dstLength = ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4);// decompressed byte array length not known
LzoAlgorithm algorithm = LzoAlgorithm.LZO1X;
LzoDecompressor decompressor =  LzoLibrary.getInstance().newDecompressor(algorithm, LzoConstraint.SAFETY);
byte dst[] = new byte[dstLength];
lzo_uintp lzo = new lzo_uintp(dstLength);
int decompress = decompressor.decompress(src, 0, src.length, dst, 0, lzo);
System.out.println("decompessed : " + decompress);//it is giving me 0
我有一个压缩格式的字节数组。这个字节数组我要解压缩,最后我要解压缩的字节数组

注意:我不知道解压缩字节数组的大小,因为我不知道解压缩字节的确切大小

我创建了下面的代码,但它没有给出任何异常,甚至没有解压缩单个字节

节目:

InputStream stream = new ByteArrayInputStream(src);
int b1 = stream.read();
int b2 = stream.read();
int b3 = stream.read();
int b4 = stream.read();
int dstLength = ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4);// decompressed byte array length not known
LzoAlgorithm algorithm = LzoAlgorithm.LZO1X;
LzoDecompressor decompressor =  LzoLibrary.getInstance().newDecompressor(algorithm, LzoConstraint.SAFETY);
byte dst[] = new byte[dstLength];
lzo_uintp lzo = new lzo_uintp(dstLength);
int decompress = decompressor.decompress(src, 0, src.length, dst, 0, lzo);
System.out.println("decompessed : " + decompress);//it is giving me 0
InputStream-stream=newbytearrayinputstream(src);
int b1=stream.read();
int b2=stream.read();
int b3=stream.read();
int b4=stream.read();

int dstLength=((b1)嗨,你成功破解了吗?嗨,你成功破解了吗?