Mercurial > projects > dwt-mac
diff dwt/internal/image/LZWCodec.d @ 34:5123b17c98ef
Ported dwt.events.*, dwt.graphics.GC, Region, dwt.internal.image.*
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sun, 14 Sep 2008 01:45:57 +0200 |
parents | e831403a80a9 |
children |
line wrap: on
line diff
--- a/dwt/internal/image/LZWCodec.d Fri Sep 12 13:53:21 2008 +0200 +++ b/dwt/internal/image/LZWCodec.d Sun Sep 14 01:45:57 2008 +0200 @@ -7,14 +7,22 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> *******************************************************************************/ -module dwt.internal.image; +module dwt.internal.image.LZWCodec; +import dwt.internal.image.LZWNode; +import dwt.internal.image.LEDataInputStream; +import dwt.internal.image.LEDataOutputStream; import dwt.DWT; import dwt.graphics.ImageData; import dwt.graphics.ImageLoader; import dwt.graphics.ImageLoaderEvent; +import dwt.dwthelper.utils; + +import tango.core.Exception; final class LZWCodec { int bitsPerPixel, blockSize, blockIndex, currentByte, bitsLeft, @@ -28,10 +36,10 @@ ImageData image; ImageLoader loader; bool interlaced; - static final int[] MASK_TABLE = new int[] { + static final int[] MASK_TABLE = [ 0x1, 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF - }; + ]; /** * Decode the input.