public class NufxLzw1InputStream
extends java.io.InputStream
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 |
| Constructor and Description |
|---|
NufxLzw1InputStream(LittleEndianByteInputStream dataStream)
Create the LZW/1 input stream.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDataCrc() |
int |
getGivenCrc() |
int |
getRleCharacter() |
int |
getVolumeNumber() |
boolean |
isCrcValid()
Indicates if the computed CRC matches the CRC given in the data stream.
|
int |
read()
Read the next byte in the decompressed data stream.
|
void |
setGivenCrc(int givenCrc) |
void |
setRleCharacter(int rleCharacter) |
void |
setVolumeNumber(int volumeNumber) |
public NufxLzw1InputStream(LittleEndianByteInputStream dataStream)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic boolean isCrcValid()
public int getGivenCrc()
public void setGivenCrc(int givenCrc)
public int getVolumeNumber()
public void setVolumeNumber(int volumeNumber)
public int getRleCharacter()
public void setRleCharacter(int rleCharacter)
public long getDataCrc()