Package org.apache.sysds.runtime.compress.io

## Class CompressedWriteBlock

- java.lang.Object
- - org.apache.sysds.runtime.compress.io.CompressedWriteBlock

All Implemented Interfaces:
  `Comparable<CompressedWriteBlock>`, `org.apache.hadoop.io.Writable`, `org.apache.hadoop.io.WritableComparable<CompressedWriteBlock>`

    public class CompressedWriteBlock
    extends Object
    implements org.apache.hadoop.io.WritableComparable<CompressedWriteBlock>

Write block for serializing either a instance of MatrixBlock or CompressedMatrixBlock, To allow spark to read in either or.

### Field Summary

Fields
`MatrixBlock` `mb`

### Constructor Summary

Constructors
`CompressedWriteBlock()` Write block used to point to a underlying instance of CompressedMatrixBlock or MatrixBlock, Unfortunately spark require a specific object type to serialize therefore we use this class.
`CompressedWriteBlock​(MatrixBlock mb)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(CompressedWriteBlock arg0)`
`MatrixBlock` `get()`
`void` `readFields​(DataInput in)`
`void` `write​(DataOutput out)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### mb

    public MatrixBlock mb

### Constructor Detail

#### CompressedWriteBlock

    public CompressedWriteBlock()

Write block used to point to a underlying instance of CompressedMatrixBlock or MatrixBlock, Unfortunately spark require a specific object type to serialize therefore we use this class.

#### CompressedWriteBlock

    public CompressedWriteBlock​(MatrixBlock mb)

### Method Detail

#### write

    public void write​(DataOutput out)
               throws IOException

Specified by:
  `write` in interface `org.apache.hadoop.io.Writable`
Throws:
  `IOException`

#### readFields

    public void readFields​(DataInput in)
                    throws IOException

Specified by:
  `readFields` in interface `org.apache.hadoop.io.Writable`
Throws:
  `IOException`

#### get

    public MatrixBlock get()

#### compareTo

    public int compareTo​(CompressedWriteBlock arg0)

Specified by:
  `compareTo` in interface `Comparable<CompressedWriteBlock>`