mirror of
https://github.com/SabreTools/SabreTools.Compression.git
synced 2026-09-21 22:35:00 +00:00
Add a little more Quantum decoding
This commit is contained in:
@@ -186,7 +186,7 @@ namespace SabreTools.Compression.Quantum
|
||||
|
||||
// Loop until the end of the stream
|
||||
var bytes = new List<byte>();
|
||||
while (true)
|
||||
while (_bitStream.Position < _bitStream.Length)
|
||||
{
|
||||
// Determine the selector to use
|
||||
int selector = GetSymbol(_selector);
|
||||
@@ -247,13 +247,19 @@ namespace SabreTools.Compression.Quantum
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
// TODO: Finish implementation:
|
||||
// - Copy data from the offsets to the lengths
|
||||
// - Return the decoded byte array
|
||||
// Copy the previous data
|
||||
int copyIndex = bytes.Count - offset;
|
||||
while (length-- > 0)
|
||||
{
|
||||
bytes.Add(bytes[copyIndex++]);
|
||||
}
|
||||
|
||||
// TODO: Add MS-CAB specific padding
|
||||
// TODO: Add Cinematronics specific checksum
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotImplementedException();
|
||||
return bytes.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user