mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Internal Fixes, etc. (#20)
* Start removing mixed usages
* Check for directories before opening
* Fix writing
* Kinda fix rebuild
* One more try
* Better internal handling
* Slighty fix a couple more things
* Update RVWorld Compress code to db7d750bba
* Fix build
Co-authored-by: Matt Nadareski <mnadareski@mparticle.com>
This commit is contained in:
@@ -71,4 +71,4 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
(1 << kNumHighLenBits);
|
||||
public const uint kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -387,7 +387,7 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
set { }
|
||||
}
|
||||
public override void Flush() { }
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -401,4 +401,4 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
public override void SetLength(long value) {}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -876,7 +876,7 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 startLen = 2; // speed optimization
|
||||
UInt32 startLen = 2; // speed optimization
|
||||
|
||||
for (UInt32 repIndex = 0; repIndex < Base.kNumRepDistances; repIndex++)
|
||||
{
|
||||
@@ -1418,7 +1418,7 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
}
|
||||
|
||||
|
||||
static string[] kMatchFinderIDs =
|
||||
static string[] kMatchFinderIDs =
|
||||
{
|
||||
"BT2",
|
||||
"BT4",
|
||||
@@ -1544,4 +1544,4 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,4 +54,4 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,11 +181,11 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
toProcess = (int)availableBytes;
|
||||
|
||||
outWindow.SetLimit(toProcess);
|
||||
if(uncompressedChunk)
|
||||
if (uncompressedChunk)
|
||||
{
|
||||
inputPosition += outWindow.CopyStream(inputStream, toProcess);
|
||||
}
|
||||
else if(decoder.Code(dictionarySize, outWindow, rangeDecoder)
|
||||
else if (decoder.Code(dictionarySize, outWindow, rangeDecoder)
|
||||
&& outputSize < 0)
|
||||
{
|
||||
availableBytes = outWindow.AvailableBytes;
|
||||
@@ -281,10 +281,10 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
if (origin!=SeekOrigin.Current)
|
||||
throw new NotImplementedException();
|
||||
if (origin != SeekOrigin.Current)
|
||||
throw new NotImplementedException();
|
||||
|
||||
byte[] tmpBuff=new byte[1024];
|
||||
byte[] tmpBuff = new byte[1024];
|
||||
long sizeToGo = offset;
|
||||
while (sizeToGo > 0)
|
||||
{
|
||||
@@ -292,7 +292,7 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
Read(tmpBuff, 0, sizenow);
|
||||
sizeToGo -= sizenow;
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
@@ -315,4 +315,4 @@ namespace Compress.SevenZip.Compress.LZMA
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user