mirror of
https://github.com/AppleCommander/ShrinkItArchive.git
synced 2025-01-18 08:30:58 +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;
|
return;
|
||||||
}
|
}
|
||||||
if (k == 0x100) {
|
if (k == 0x100) {
|
||||||
clearDictionary();
|
dictionary = null;
|
||||||
|
is.setRequestedNumberOfBits(9);
|
||||||
|
k = 0;
|
||||||
|
w = null;
|
||||||
|
entry = null;
|
||||||
|
newBuffer = true;
|
||||||
fillBuffer(); // Warning: recursive call
|
fillBuffer(); // Warning: recursive call
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -115,20 +120,6 @@ public class LzwInputStream extends InputStream {
|
|||||||
newBuffer = true;
|
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.
|
* 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
|
* The dictionary is the only item that is not cleared -- that needs to be done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user