{"id":35149120,"url":"https://github.com/venomalia/auroralib.compression","last_synced_at":"2026-03-04T13:07:38.202Z","repository":{"id":205786060,"uuid":"713100989","full_name":"Venomalia/AuroraLib.Compression","owner":"Venomalia","description":"Supports a wide range of compression algorithms mainly used in video games, like LZSS, LZ10, MIO0, YAZ0, LZO, PRS and more.","archived":false,"fork":false,"pushed_at":"2026-02-27T20:58:31.000Z","size":939,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-27T23:52:32.495Z","etag":null,"topics":["compression","decompression","development","lz4","lzo","lzss","modding","yay0","yaz0","zlib"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Venomalia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-01T20:54:15.000Z","updated_at":"2026-02-27T20:58:34.000Z","dependencies_parsed_at":"2024-02-11T23:22:44.606Z","dependency_job_id":"f5ef60d8-e976-4023-bfb5-1913127a57e8","html_url":"https://github.com/Venomalia/AuroraLib.Compression","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"18d23e40bcd07a31068bd9ac75d755f81b45a066"},"previous_names":["venomalia/auroralib.compression"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/Venomalia/AuroraLib.Compression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venomalia%2FAuroraLib.Compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venomalia%2FAuroraLib.Compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venomalia%2FAuroraLib.Compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venomalia%2FAuroraLib.Compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Venomalia","download_url":"https://codeload.github.com/Venomalia/AuroraLib.Compression/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venomalia%2FAuroraLib.Compression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30081259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T12:28:08.313Z","status":"ssl_error","status_checked_at":"2026-03-04T12:27:28.210Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","decompression","development","lz4","lzo","lzss","modding","yay0","yaz0","zlib"],"created_at":"2025-12-28T14:53:18.161Z","updated_at":"2026-03-04T13:07:38.195Z","avatar_url":"https://github.com/Venomalia.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AuroraLib.Compression\n\nAuroraLib.Compression is a high-performance, memory-efficient library for a broad range of compression algorithms primarily used in video games.\nDesigned for seamless use across multiple .NET versions. Written entirely in managed C#, it eliminates the need for external C++ libraries while offering fast decompression and compression.\n\n## Supported Algorithms\n\n### AuroraLib.Compression\n\n[![NuGet Package](https://img.shields.io/nuget/v/AuroraLib.Compression.svg?style=flat-square\u0026label=NuGet%20Package)](https://www.nuget.org/packages/AuroraLib.Compression)\n\n| Algorithm      | Description                                                                |\n|----------------|----------------------------------------------------------------------------|\n| LZO            | Lempel–Ziv–Oberhumer algorithm, focused on decompression speed             |\n| LZ4            | LZ4 is similar to LZO focused on decompression speed.                      |\n| LZSS           | LZSS compression algorithm used in many games.                             |\n| GZip           | GZip based on DEFLATE compression algorithm.                               |\n| ZLib           | ZLib based on DEFLATE compression algorithm.                               |\n| LZ10           | Nintendo LZ10 compression used in various GBA, DS and WII games.           |\n| LZ11           | Nintendo LZ11 compression used in various DS and WII games.                |\n| LZ77           | Nintendo LZ77 based on LZ10 used in WII games and data.                    |\n| Yay0*          | Nintendo YAY0 compression used in some Nintendo 64 and GameCube games.     |\n| Yaz0*          | Nintendo Yaz0 compression used in games from the N64 to Switch era.        |\n| HUF20          | Nintendo Huffman compression algorithm, mainly used in GBA and DS games.   |\n| RLE30          | Nintendo RLE compression algorithm used in GBA games.                      |\n| PRS*           | Sega PRS compression algorithm used in various Sega games.                 |\n| RefPack        | RefPack compression algorithm used in some EA games.                       |\n| Brotli         | Brotli by Jyrki Alakuijala and Zoltán Szabadka. (net6 and later)           |\n\n `*` Big-endian and little-endian version are supported.\n \n### AuroraLib.Compression-Extended\n\n[![NuGet Package](https://img.shields.io/nuget/v/AuroraLib.Compression-Extended.svg?style=flat-square\u0026label=NuGet%20Package)](https://www.nuget.org/packages/AuroraLib.Compression-Extended)\n\n| Algorithm      | Description                                                                |\n|----------------|----------------------------------------------------------------------------|\n| BLZ            | Nintendo BLZ compression, mainly used on the 3ds games.                    |\n| LZ40           | Nintendo LZ40 compression, mainly used in DS games.                        |\n| LZ60           | Nintendo LZ60 corresponds to LZ40 algorithm.                               |\n| SMSR00         | Nintendo SMSR00 compression, mainly used in Yoshi's Story.                 |\n| MIO0*          | Nintendo MIO0 compression mainly used in early Nintendo 64 games.          |\n| Yaz1*          | Identical to Yaz0 used for data on the N64DD.                              |\n| ALLZ           | Aqualead LZ compression algorithm used by a handful of games.              |\n| LZOn           | Nintendo LZOn compression algorithm mainly used in DS Download Games.      |\n| HWGZ*          | Hyrule Warriors GZ compression format based on ZLib.                       |\n| RareZip        | Rareware Zip based on DEFLATE, used in banjo-kazooie.                      |\n| LZSega         | A LZSS based compression algorithm used in some Sega GameCube games.       |\n| CRILAYLA       | Algorithm by CRI Middleware, used in games built with the CRIWARE toolset. |\n| CNX2           | Sega CNX2 algorithm, used in some Puyo Puyo.                               |\n| COMP           | Sega COMP based on LZ11 algorithm, used in some Puyo Puyo.                 |\n| CXLZ           | Sega CXLZ based on LZ10 algorithm, used in some Puyo Puyo.                 |\n| LZ00           | Sega LZ00 is based on LZSS algorithm with encryption.                      |\n| LZ01           | Sega LZ01 based on LZSS algorithm, used in some Puyo Puyo.                 |\n| MDB4           | Sega MDB4 base on LZSS, used in Typing of the Dead for the PlayStation 2.  |\n| AKLZ           | A LZSS based algorithm used in Skies of Arcadia Legends.                   |\n| CNS            | CNS compression algorithm, used in Games from Red Entertainment.           |\n| CLZ0           | CLZ0 compression algorithm, used in Games from Victor Interactive Software.|\n| FCMP           | FCMP based on LZSS algorithm, used in Muramasa The Demon Blade.            |\n| GCLZ           | GCLZ based on LZ10 algorithm, used in Pandora's Tower.                     |\n| LZ02           | LZ02 compression algorithm used in Mario Golf: Toadstool Tour.             |\n| LZHudson       | A LZSS based compression algorithm used in Mario Party 4-7.                |\n| RLHudson       | A RLE based compression algorithm used in Mario Party 4-7.                 |\n| LZShrek        | LZShrek compression algorithm used in Shrek Super Slam.                    |\n| AsuraZlb       | AsuraZlb based on ZLib compression algorithm used in Simpsons The Game.    |\n| HIG            | High Impact Games WAD compression, similar to LZO.\t\t\t              |\n| ZLB            | ZLB based on ZLib compression algorithm used in Star Fox Adventures.       |\n| MDF0           | Konami MDF0 based on ZLib used in Castlevania: The Adventure ReBirth.      |\n| GCZ            | Konami GCZ based on LZSS, mainly used in Konami/Bemani music games.        |\n| Level5         | Level5 compression algorithm, mainly used in Level5 3ds games.             |\n| Level5LZSS     | Level5 SSZL algorithm base on LZSS, used in Inazuma Eleven 3.              |\n| SDPC           | TREVA Entertainment SDPC compression based on LZO.                         |\n| SSZL           | SynSophiaZip based on Zlib with Mersenne Twister xor encryption.           |\n| IECP           | IECP algorithm base on LZSS, used in Fate/Extra.                           |\n| ECD            | Rocket Company ECD algorithm base on LZSS, used in Kanken Training 2.      |\n| aPLib          | aPLib is a pure LZ-based compression algorithm by Jørgen Ibsen.            |\n| WFLZ           | WayForward's LZ algorithm, focused on decompression speed.                 |\n| ZLWF           | WayForward's LZ chunk header.                                              |\n\n `*` Big-endian and little-endian version are supported.\n \n[Command line tool](https://github.com/Venomalia/AuroraLib.Compression/releases)\n\n[Benchmarks](https://github.com/Venomalia/AuroraLib.Compression/blob/main/Benchmarks.md)\n\n## How To Use\n\n### Decompress a File Using a Specific Algorithm\n``` csharp\n    using FileStream source = new(\"input.dat\", FileMode.Open, FileAccess.Read, FileShare.Read);\n    using FileStream destination = new(\"output.dat\", FileMode.Create, FileAccess.ReadWrite, FileShare.None);\n    new LZSS().Decompress(source, destination);\n```\n\n### Compress a File Using a Specific Algorithm\n``` csharp\n    using FileStream source = new(\"input.dat\", FileMode.Open, FileAccess.Read, FileShare.Read);\n    using FileStream destination = new(\"output.dat\", FileMode.Create, FileAccess.ReadWrite, FileShare.None);\n    new LZSS().Compress(source, destination);\n```\n\n### Check If a File Matches a Specific Compression Algorithm\n``` csharp\n    using FileStream source = new(\"input.dat\", FileMode.Open, FileAccess.Read, FileShare.Read);\n    bool canDecompressed = new LZSS().IsMatch(source);\n```\n\n### Configure an Compression Encoder\n``` csharp\n    Yaz0 encoder = new Yaz0\n    {\n        FormatByteOrder = Endian.Big,  // Use big-endian byte order\n        LookAhead = false              // Disable look-ahead optimization\n    };\n```\n\n### Automatically Detect and Decompress Using a Recognized Algorithm\n``` csharp\n    FormatDictionary formats = new FormatDictionary(new Assembly[] { AuroraLib_Compression, AuroraLib_Compression_Extended });\n\n    using FileStream source = new(\"input.dat\", FileMode.Open, FileAccess.Read, FileShare.Read);\n    ReadOnlySpan\u003cchar\u003e fileName = Path.GetFileName(\"input.dat\");\n\n    if (formats.Identify(source, fileName, out IFormatInfo format) \u0026\u0026 format.Class != null)\n    {\n        var decoder = format.CreateInstance();\n        if (decoder is ICompressionDecoder compressionDecoder)\n        {\n            using Stream destination = compressionDecoder.Decompress(source);\n            // Use the decompressed stream as needed\n        }\n    }\n```\n\n# Credits\n\n- [Nickworonekin](https://github.com/nickworonekin/puyotools) Puyo Tools inspired the LZ Decode and Encode code and reference for CNX2, LZ00, LZ01, LZ10, LZ11, PRS algorithms.\n- [Haruhiko Okumura](https://oku.edu.mie-u.ac.jp/) reference his original C implementation of the LZSS algorithm.\n- [Daniel-McCarthy](https://github.com/Daniel-McCarthy/Mr-Peeps-Compressor) reference for MIO0, YAZ0, YAY0 algorithm.\n- [Kuriimu](https://github.com/IcySon55/Kuriimu/blob/ebfbf8de50755cc32a7e1ea4aee394628d49d3d2/src/Kontract/Compression/Huffman.cs#L9) reference for HUF20 algorithm.\n- [Niotso.wiki](http://wiki.niotso.org/RefPack) reference for RefPack algorithm.\n- [Sukharah](https://github.com/sukharah/CLZ-Compression) reference for CLZ0 algorithm.\n- [Gamemasterplc](https://github.com/gamemasterplc/mpbintools/blob/master/bindump.c#L240C6-L240C21) reference for LZHudson algorithm.\n- [KirbyUK](https://github.com/ShrekBoards/shrek-superslam/blob/master/src/compression.rs#L66) reference for LZShrek algorithm.\n- [Brolijah](https://github.com/Brolijah/Aqualead_LZSS) reference for ALLZ algorithm.thm.\n- [CUE](https://www.romhacking.net/utilities/826/) reference for LZ40 algorithm.\n- [LZ4](https://github.com/lz4/lz4/tree/dev/doc) reference for LZ4 algorithm.\n- [hack64](https://hack64.net/wiki/doku.php?id=yoshis_story:smsr00_compression) reference for SMSR00 algorithm.\n- [RareZip](https://github.com/MittenzHugg/rarezip/tree/2c4ba146c1b2fec851d3db8cf455c6af090bc544) reference for RareZip algorithm.\n- [ShaneYCG](https://github.com/ShaneYCG/wflz/tree/master) reference for WFLZ algorithm.\n- [UYA_pyTools](https://github.com/electrogecko/UYA_pyTools/blob/main/SM/tjzip_dump.py) reference for HIG algorithm.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenomalia%2Fauroralib.compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenomalia%2Fauroralib.compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenomalia%2Fauroralib.compression/lists"}