|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.hdgf.HDGFLZW
public class HDGFLZW
A decoder for the crazy LZW implementation used in Visio. According to VSDump, "it's a slightly perverted version of LZW compression, with inverted meaning of flag byte and 0xFEE as an 'initial shift'". It uses 12 bit codes (http://www.gnome.ru/projects/vsdump_en.html) Two good resources on LZW are: http://en.wikipedia.org/wiki/LZW http://marknelson.us/1989/10/01/lzw-data-compression/
| Constructor Summary | |
|---|---|
HDGFLZW()
|
|
| Method Summary | |
|---|---|
byte[] |
compress(java.io.InputStream src)
Compress the given input stream, returning the array of bytes of the compressed input |
void |
compress(java.io.InputStream src,
java.io.OutputStream res)
Performs the Visio compatible streaming LZW compression. |
byte[] |
decode(java.io.InputStream src)
Decompresses the given input stream, returning the array of bytes of the decompressed input. |
void |
decode(java.io.InputStream src,
java.io.OutputStream res)
Perform a streaming decompression of the input. |
static int |
fromByte(byte b)
Given a java byte, turn it into an integer between 0 and 255 (i.e. |
static byte |
fromInt(int b)
Given an integer, turn it into a java byte, handling the wrapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HDGFLZW()
| Method Detail |
|---|
public static byte fromInt(int b)
public static int fromByte(byte b)
public byte[] compress(java.io.InputStream src)
throws java.io.IOException
java.io.IOException
public byte[] decode(java.io.InputStream src)
throws java.io.IOException
java.io.IOException
public void decode(java.io.InputStream src,
java.io.OutputStream res)
throws java.io.IOException
java.io.IOException
public void compress(java.io.InputStream src,
java.io.OutputStream res)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||