FileDocCategorySizeDatePackage
TestLZW4HDGF.javaAPI DocApache Poi 3.0.15455Mon Jun 18 19:08:08 BST 2007org.apache.poi.hdgf

TestLZW4HDGF

public class TestLZW4HDGF extends TestCase

Fields Summary
public static final byte[]
testTrailerComp
public static final byte[]
testTrailerDecomp
Constructors Summary
Methods Summary
public voidtestCounts()

	
	     
		assertEquals(339, testTrailerComp.length);
		assertEquals(632, testTrailerDecomp.length);
		
		// Decode it using our engine
		LZW4HDGF lzw2 = new LZW4HDGF();
		byte[] dec = lzw2.decode(new ByteArrayInputStream(testTrailerComp));
		
		// Check it's of the right size
		assertEquals(632, dec.length);
		
		// Now check it matches
		for(int i=0; i<dec.length; i++) {
			if(dec[i] != testTrailerDecomp[i]) 
				System.err.println(i + "\t" + dec[i] + "\t" + testTrailerDecomp[i]);
		}