[ZOO] Add support for compression method 2 (LH5).

This commit is contained in:
2025-08-26 02:11:51 +01:00
parent f6e63f3b98
commit 522dacc9cc
3 changed files with 6 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ using System.Runtime.InteropServices;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Compression;
using Aaru.Filters;
using Aaru.Helpers;
using Aaru.Helpers.IO;
@@ -175,7 +176,7 @@ public sealed partial class Zoo
Direntry entry = _files[entryNumber];
if(entry.packing_method > 1) return ErrorNumber.NotImplemented;
if(entry.packing_method > 2) return ErrorNumber.InvalidArgument;
Stream stream = new OffsetStream(new NonClosableStream(_stream),
_files[entryNumber].offset,
@@ -185,6 +186,8 @@ public sealed partial class Zoo
if(entry.packing_method == 1) stream = new ForcedSeekStream<LzdStream>(entry.org_size, stream);
if(entry.packing_method == 2) stream = new Lh5Stream(stream, entry.org_size);
filter = new ZZZNoFilter();
ErrorNumber errno = filter.Open(stream);