mirror of
https://github.com/AppleCommander/ShrinkItArchive.git
synced 2025-01-03 01:30:42 +00:00
Correcting behavior when the clear dictionary code is received (0x100).
This commit is contained in:
parent
aad7071358
commit
f11ba01ee2
@ -74,7 +74,12 @@ public class LzwInputStream extends InputStream {
|
||||
return;
|
||||
}
|
||||
if (k == 0x100) {
|
||||
clearDictionary();
|
||||
dictionary = null;
|
||||
is.setRequestedNumberOfBits(9);
|
||||
k = 0;
|
||||
w = null;
|
||||
entry = null;
|
||||
newBuffer = true;
|
||||
fillBuffer(); // Warning: recursive call
|
||||
return;
|
||||
}
|
||||
@ -115,20 +120,6 @@ public class LzwInputStream extends InputStream {
|
||||
newBuffer = true;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Provide necessary housekeeping to reset LZW stream between NuFX buffer changes.
|
||||
// * The dictionary is the only item that is not cleared -- that needs to be done
|
||||
// * explicitly since behavior between LZW/1 and LZW/2 differ.
|
||||
// */
|
||||
// public void resetState() {
|
||||
// is.clearRemainingBitsOfData();
|
||||
// outputBuffer.clear();
|
||||
// k = 0;
|
||||
// w = null;
|
||||
// entry = null;
|
||||
// newBuffer = true;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Provide necessary housekeeping to reset LZW stream between NuFX buffer changes.
|
||||
* The dictionary is the only item that is not cleared -- that needs to be done
|
||||
|
Loading…
Reference in New Issue
Block a user