geotrellis.data.geotiff

LzwEncoder

abstract class LzwEncoder extends AnyRef

Abstract class to maintain internal LZW encoder state.

This class should be overridden for different bit widths and formats (e.g. 1-bit, 8-bit unsigned, 32-bit floating-point, etc).

Since the LZW algorithm is very stateful this class uses its own mutable state to keep track of things like the string table. It is not intended to be used directly; you should use LzwEncoder.render(...) instead.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LzwEncoder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LzwEncoder(encoder: Encoder)

Abstract Value Members

  1. abstract def handleCell(i: Int): Unit

    Process a single cell of raster data according to LZW.

    Process a single cell of raster data according to LZW.

    This should encode the cell's value appropriately into bytes (taking into account NODATA, sign, etc) and then make one or more handleByte calls.

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addCode(str: String): Unit

    Add the given string to the string table.

    Add the given string to the string table.

    If the string table fills up, this method will write out omega (as a 12-bit code) and then reset the string table and omega.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. var buffer: Int

  9. var bufpos: Int

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. var codeBits: Int

  12. val cols: Int

  13. val data: Array[Int]

  14. val dmg: DataOutputStream

  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def flushBuffer(): Unit

    Write out all remaining buffered data.

    Write out all remaining buffered data. This will have the effect of possibly padding the last value up to a byte boundary.

  19. def flushByte(b: Byte): Unit

  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. def getCode(s: String): Int

    Retrieve the given string from the string table.

    Retrieve the given string from the string table.

    This method will crash if the string can't be found.

  22. def handleByte(k: Int): Unit

    Process a single byte of image data according to LZW.

    Process a single byte of image data according to LZW.

    This is the heart of the LZW algorithm.

  23. def hasCode(s: String): Boolean

    Test if the given string is available in the table.

  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. val imageStartOffset: Int

  26. def initStringTable(): Unit

    Reinitializes all state related to the string table.

    Reinitializes all state related to the string table. After this happens codes will reset to 258 and being 9-bit.

    It's important to remember to flush the omega variable before calling this method, and also to call it while there is still room in the 12-bit string table (i.e. once 4094 has been added).

  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. val lengths: Array[Int]

  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. var nextCode: Int

  31. var nextLimit: Int

  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  34. var offset: Int

  35. val offsets: Array[Int]

  36. var omega: String

  37. def render(): (Array[Int], Array[Int])

  38. val rows: Int

  39. val rowsPerStrip: Int

  40. def setOmega(s: String): Unit

  41. var stringTable: Map[String, Int]

  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. def toString(): String

    Definition Classes
    AnyRef → Any
  44. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. def writeCode(code: Int): Unit

    Write a 9-12 bit code to our output.

    Write a 9-12 bit code to our output.

    Due to byte-alignment issues we use a buffering strategy, writing out complete 2 byte "chunks" at a time.

  48. def xyz(o: String): IndexedSeq[Int]

Inherited from AnyRef

Inherited from Any

Ungrouped