OpenVDB
12.0.0
|
Classes | |
class | Page |
Stores a variable-size, compressed, delayed-load Page of data that is loaded into memory when accessed. Access to the Page is thread-safe as loading and decompressing the data is protected by a mutex. More... | |
class | PagedInputStream |
A Paging wrapper to std::istream that is responsible for reading from a given input stream and creating Page objects and PageHandles that reference those pages for delayed reading. More... | |
class | PagedOutputStream |
A Paging wrapper to std::ostream that is responsible for writing from a given output stream at intervals set by the PageSize. As Pages are variable in size, they are flushed to disk as soon as sufficiently large. More... | |
class | PageHandle |
A PageHandle holds a unique ptr to a Page and a specific stream pointer to a point within the decompressed Page buffer. More... | |
Functions | |
OPENVDB_API bool | bloscCanCompress () |
Returns true if compression is available. More... | |
OPENVDB_API size_t | bloscUncompressedSize (const char *buffer) |
Retrieves the uncompressed size of buffer when uncompressed. More... | |
OPENVDB_API void | bloscCompress (char *compressedBuffer, size_t &compressedBytes, const size_t bufferBytes, const char *uncompressedBuffer, const size_t uncompressedBytes) |
Compress into the supplied buffer. More... | |
OPENVDB_API std::unique_ptr< char[]> | bloscCompress (const char *buffer, const size_t uncompressedBytes, size_t &compressedBytes, const bool resize=true) |
Compress and return the heap-allocated compressed buffer. More... | |
OPENVDB_API size_t | bloscCompressedSize (const char *buffer, const size_t uncompressedBytes) |
Convenience wrapper to retrieve the compressed size of buffer when compressed. More... | |
OPENVDB_API void | bloscDecompress (char *uncompressedBuffer, const size_t expectedBytes, const size_t bufferBytes, const char *compressedBuffer) |
Decompress into the supplied buffer. Will throw if decompression fails or uncompressed buffer has insufficient space in which to decompress. More... | |
OPENVDB_API std::unique_ptr< char[]> | bloscDecompress (const char *buffer, const size_t expectedBytes, const bool resize=true) |
Decompress and return the the heap-allocated uncompressed buffer. More... | |
Variables | |
static const int | BLOSC_MINIMUM_BYTES = 48 |
static const int | BLOSC_PAD_BYTES = 128 |
static const int | PageSize = 1024 * 1024 |
OPENVDB_API bool openvdb::v12_0::compression::bloscCanCompress | ( | ) |
Returns true if compression is available.
OPENVDB_API void openvdb::v12_0::compression::bloscCompress | ( | char * | compressedBuffer, |
size_t & | compressedBytes, | ||
const size_t | bufferBytes, | ||
const char * | uncompressedBuffer, | ||
const size_t | uncompressedBytes | ||
) |
Compress into the supplied buffer.
compressedBuffer | the buffer to compress |
compressedBytes | number of compressed bytes |
bufferBytes | the number of bytes in compressedBuffer available to be filled |
uncompressedBuffer | the uncompressed buffer to compress |
uncompressedBytes | number of uncompressed bytes |
OPENVDB_API std::unique_ptr<char[]> openvdb::v12_0::compression::bloscCompress | ( | const char * | buffer, |
const size_t | uncompressedBytes, | ||
size_t & | compressedBytes, | ||
const bool | resize = true |
||
) |
Compress and return the heap-allocated compressed buffer.
buffer | the buffer to compress |
uncompressedBytes | number of uncompressed bytes |
compressedBytes | number of compressed bytes (written to this variable) |
resize | the compressed buffer will be exactly resized to remove the portion used for Blosc overhead, for efficiency this can be skipped if it is known that the resulting buffer is temporary |
OPENVDB_API size_t openvdb::v12_0::compression::bloscCompressedSize | ( | const char * | buffer, |
const size_t | uncompressedBytes | ||
) |
Convenience wrapper to retrieve the compressed size of buffer when compressed.
buffer | the uncompressed buffer |
uncompressedBytes | number of uncompressed bytes |
OPENVDB_API void openvdb::v12_0::compression::bloscDecompress | ( | char * | uncompressedBuffer, |
const size_t | expectedBytes, | ||
const size_t | bufferBytes, | ||
const char * | compressedBuffer | ||
) |
Decompress into the supplied buffer. Will throw if decompression fails or uncompressed buffer has insufficient space in which to decompress.
uncompressedBuffer | the uncompressed buffer to decompress into |
expectedBytes | the number of bytes expected once the buffer is decompressed |
bufferBytes | the number of bytes in uncompressedBuffer available to be filled |
compressedBuffer | the compressed buffer to decompress |
OPENVDB_API std::unique_ptr<char[]> openvdb::v12_0::compression::bloscDecompress | ( | const char * | buffer, |
const size_t | expectedBytes, | ||
const bool | resize = true |
||
) |
Decompress and return the the heap-allocated uncompressed buffer.
buffer | the buffer to decompress |
expectedBytes | the number of bytes expected once the buffer is decompressed |
resize | the compressed buffer will be exactly resized to remove the portion used for Blosc overhead, for efficiency this can be skipped if it is known that the resulting buffer is temporary |
OPENVDB_API size_t openvdb::v12_0::compression::bloscUncompressedSize | ( | const char * | buffer | ) |
Retrieves the uncompressed size of buffer when uncompressed.
buffer | the compressed buffer |
|
static |
|
static |
|
static |