public static int[] LzwLinesEn(IntField bitfield, int lineheight, int backadd) { int[] symbols = BitImageToLineSymbols(bitfield, lineheight); LzwCodec lzw = new LzwCodec(1 << lineheight); return(lzw.Encode(symbols)); }
public static void TestLzw() { LzwCodec lzw = new LzwCodec(5); int[] res = lzw.Encode(new int[] { 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4 }); }