public class NufxLzw2InputStream
extends java.io.InputStream
NufxLzw2InputStream reads a data fork or
resource fork written in the NuFX LZW/2 format.
The layout of the LZW/2 data is as follows:
| "Fork" Header | ||
|---|---|---|
| +0 | Byte | Low-level volume number used to format 5.25" disks |
| +1 | Byte | RLE character used to decode this thread |
| Each subsequent 4K chunk of data | ||
| +0 | Word | Bits 0-12: Length after RLE compression Bit 15: LZW flag (set to 1 if LZW used) |
| +2 | Word | If LZW flag = 1, total bytes in chunk Else (flag = 0) start of data |
| Constructor and Description |
|---|
NufxLzw2InputStream(LittleEndianByteInputStream dataStream)
Create the LZW/2 input stream.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDataCrc() |
int |
getRleCharacter() |
int |
getVolumeNumber() |
int |
read()
Read the next byte in the decompressed data stream.
|
void |
setRleCharacter(int rleCharacter) |
void |
setVolumeNumber(int volumeNumber) |
public NufxLzw2InputStream(LittleEndianByteInputStream dataStream)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int getVolumeNumber()
public void setVolumeNumber(int volumeNumber)
public int getRleCharacter()
public void setRleCharacter(int rleCharacter)
public long getDataCrc()