So I have a file that was compressed in C# using LZ4Stream. For some reason when I try to decompress it - I get following Exception
java.io.IOException: Stream unsupported
at net.jpountz.lz4.LZ4FrameInputStream.nextFrameInfo(LZ4FrameInputStream.java:157)
at net.jpountz.lz4.LZ4FrameInputStream.read(LZ4FrameInputStream.java:330)
I'm not sure what exactly am I doing wrong here. My code:
try (var fileStream = new FileInputStream(mapDir.resolve("procedural.map").toString())) {
if (Unpooled.wrappedBuffer(fileStream.readNBytes(4)).order(ByteOrder.LITTLE_ENDIAN).getUnsignedInt(0) == 9) {
try (var decompressStream = new LZ4FrameInputStream(fileStream)) {
var data = decompressStream.read();
}
}
} catch (IOException e) {
e.printStackTrace();
}
I also must note that compressed data was preappended with unsigned int constant in little endian format(just number 9).
Here is the file itself (it's around 50mb): Link
The exact C# code that was used to create compressed file.
So I have a file that was compressed in C# using LZ4Stream. For some reason when I try to decompress it - I get following Exception
I'm not sure what exactly am I doing wrong here. My code:
I also must note that compressed data was preappended with unsigned int constant in little endian format(just number 9). Here is the file itself (it's around 50mb): Link The exact C# code that was used to create compressed file.