public class BitmapEncoder extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BITMAP_BLOCK_SZ
Size of the blocks used in a blocked bitmap representation.
|
Constructor and Description |
---|
BitmapEncoder() |
Modifier and Type | Method and Description |
---|---|
static UncompressedBitmap |
extractBitmap(int[] colIndices,
MatrixBlock rawblock)
Generate uncompressed bitmaps for a set of columns in an uncompressed
matrix block.
|
static UncompressedBitmap |
extractBitmapFromSample(int[] colIndices,
MatrixBlock rawblock,
int[] sampleIndexes) |
static char[] |
genOffsetBitmap(int[] offsets,
int len)
Encodes the bitmap in blocks of offsets.
|
static char[] |
genRLEBitmap(int[] offsets,
int len)
Encodes the bitmap as a series of run lengths and offsets.
|
static int |
getAlignedBlocksize(int blklen) |
public static final int BITMAP_BLOCK_SZ
public static int getAlignedBlocksize(int blklen)
public static UncompressedBitmap extractBitmap(int[] colIndices, MatrixBlock rawblock)
colIndices
- indexes (within the block) of the columns to extractrawblock
- an uncompressed matrix block; can be dense or sparsepublic static UncompressedBitmap extractBitmapFromSample(int[] colIndices, MatrixBlock rawblock, int[] sampleIndexes)
public static char[] genRLEBitmap(int[] offsets, int len)
offsets
- uncompressed offset listlen
- logical length of the given offset listpublic static char[] genOffsetBitmap(int[] offsets, int len)
offsets
- uncompressed offset listlen
- logical length of the given offset listCopyright © 2018 The Apache Software Foundation. All rights reserved.