mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-07-08 18:16:24 +00:00
[NDIF] Implement LZH support.
This commit is contained in:
@@ -143,10 +143,6 @@ public sealed partial class Ndif
|
||||
case CHUNK_TYPE_KENCODE:
|
||||
AaruLogging.Error(Localization.Chunks_compressed_with_KenCode_are_not_yet_supported);
|
||||
|
||||
return ErrorNumber.NotImplemented;
|
||||
case CHUNK_TYPE_LZH:
|
||||
AaruLogging.Error(Localization.Chunks_compressed_with_LZH_are_not_yet_supported);
|
||||
|
||||
return ErrorNumber.NotImplemented;
|
||||
case CHUNK_TYPE_STUFFIT:
|
||||
AaruLogging.Error(Localization.Chunks_compressed_with_StuffIt_are_not_yet_supported);
|
||||
@@ -357,6 +353,16 @@ public sealed partial class Ndif
|
||||
break;
|
||||
}
|
||||
|
||||
case CHUNK_TYPE_LZH:
|
||||
{
|
||||
var tmpBuffer = new byte[_bufferSize];
|
||||
realSize = AppleLzh.DecodeBuffer(cmpBuffer, tmpBuffer);
|
||||
data = new byte[realSize];
|
||||
Array.Copy(tmpBuffer, 0, data, 0, realSize);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return ErrorNumber.NotSupported;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user