Implement LZSS decompression with optional XOR decryption

- Added `lzss_decompress_simple` function for LZSS decompression in `lzss.rs`.
- Introduced `XorState` struct and `xor_stream` function for XOR decryption in `xor.rs`.
- Updated `mod.rs` to include new LZSS and XOR modules.
- Refactored `parse_library` function in `parse.rs` to utilize the new XOR decryption functionality.
- Cleaned up and organized code in `lib.rs` by removing redundant functions and structures.
- Added tests for new functionality in `tests.rs`.
This commit is contained in:
2026-02-10 08:38:58 +00:00
parent ce6e30f727
commit 842f4a8569
9 changed files with 700 additions and 681 deletions

View File

@@ -1,4 +1,6 @@
use super::*;
use crate::compress::lzh::{LZH_MAX_FREQ, LZH_N_CHAR, LZH_R, LZH_T};
use crate::compress::xor::xor_stream;
use flate2::write::DeflateEncoder;
use flate2::Compression;
use std::any::Any;