diff --git a/NyaFs/Filesystem/SquashFs/Compression/Lz4.cs b/NyaFs/Filesystem/SquashFs/Compression/Lz4.cs index 43634c7..652ae08 100644 --- a/NyaFs/Filesystem/SquashFs/Compression/Lz4.cs +++ b/NyaFs/Filesystem/SquashFs/Compression/Lz4.cs @@ -1,4 +1,5 @@ using System; +using System.IO; namespace NyaFs.Filesystem.SquashFs.Compression { @@ -40,9 +41,12 @@ internal override byte[] Compress(byte[] data) throw new NotImplementedException(); } - internal override byte[] Decompress(byte[] data) + internal override byte[] Decompress(byte[] Data) { - throw new NotImplementedException(); + var Res = new byte[8192]; + + FT.LZ4.LZ4Codec.Decode(Data, 0, Data.Length, Res, 0, Res.Length); + return Res; } [Flags] diff --git a/readme.md b/readme.md index 15cea7c..f01d823 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,7 @@ There is possible to add or update files in ramfs image. Supported at now: 1. CPIO ASCII (RW) 2. EXT2 (R) -3. SquashFs [xz, gzip, lzma compressed] (R) +3. SquashFs [xz, gzip, lzma, lz4 compressed] (R) ## Supported compression types Supported at now: @@ -93,7 +93,7 @@ Load fs from ext2 image: ``` load ramfs ext2 ``` -Load fs from squashfs image (xz, gzip, lzma compressed): +Load fs from squashfs image (xz, gzip, lzma, lz4 compressed): ``` load ramfs squashfs ```