thorbenk / blockedarray

read/write to a blocked, in-memory compressed array
Other
8 stars 2 forks source link

blockedarray

Build Status

C++ code and boost::python wrapper for a blocked, in-memory compressed array that supports read/write access to arbitrary regions of interest.

compressed array

The class BW::CompressedArray<N,T> represents a N-dimensional array with pixel type T. The array data can be stored compressed (CompressedArray::compress()) or uncompressed (BW::CompressedArray::uncompress()). When reading data (BW::CompressedArray::readArray), the data is - if needed - uncompressed first.

The compression algorithm used is google snappy.

blocked array

BW::Array<N,T> stores N-dimension array data of pixel type T in blocks (of a size to be specified in the constructor). Each block is stored compressed in memory, using google snappy, a fast compression/decompression algorithm.

Regions of interest of arbitrary offset and shape can be read, written and deleted.

This class is useful if the whole dataset does not fit into memory. It is the intention that this class is evaluated as a replacement for lazyflow's OpBlockedArrayCache, OpSlicedBlockArrayCache, OpCompressedCache. Towards this goal, a preliminary operator wrapper can be found in blockedarray/lazyflow.

installation