- All Implemented Interfaces:
Closeable
, AutoCloseable
The
NufxLzw1InputStream
reads a data fork or
resource fork written in the NuFX LZW/1 format.
The layout of the LZW/1 data is as follows:
"Fork" Header |
+0 |
Word |
CRC-16 of the uncompressed data within the thread |
+2 |
Byte |
Low-level volume number use to format 5.25" disks |
+3 |
Byte |
RLE character used to decode this thread |
Each subsequent 4K chunk of data |
+0 |
Word |
Length after RLE compression (if RLE is not used, length
will be 4096 |
+2 |
Byte |
A $01 indicates LZW applied to this chunk; $00 that LZW
was not applied to this chunk |
Note that the LZW string table is cleared after
every chunk.
-
Constructor Summary
Constructors
Create the LZW/1 input stream.
-
Method Summary
long
int
int
int
boolean
Indicates if the computed CRC matches the CRC given in the data stream.
int
Read the next byte in the decompressed data stream.
void
void
void
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
-
isCrcValid
public boolean isCrcValid()
Indicates if the computed CRC matches the CRC given in the data stream.
-
getGivenCrc
public int getGivenCrc()
-
setGivenCrc
public void setGivenCrc(int givenCrc)
-
-
-
getRleCharacter
public int getRleCharacter()
-
setRleCharacter
public void setRleCharacter(int rleCharacter)
-
getDataCrc
public long getDataCrc()