HDK
|
#include <UT_CompressedBlockIndex.h>
Public Member Functions | |
UT_CompressedBlockIndex () | |
void | setBlockSize (exint blockSize, exint lastBlockSize) |
void | append (BlockLocationType entry) |
Adds entry to the end of the index. More... | |
void | removeLast () |
Removes the last entry. More... | |
exint | getTotalUncompressedSize () const |
Get's the total uncompressed size of the stream with this block index. More... | |
BlockLocationType | getCompressedBlockOffset (exint uncompressedOffset) const |
BlockLocationType | getCompressedBlockOffsetFromEnd (exint uncompressedOffsetFromEnd) const |
exint | getBlockNumberCompressedOffset (BlockLocationType compressedOffset) const |
Get the block number given offset in compressed file. More... | |
int64 | getLength () const |
Get the length in the file of the entire index section (for seeking) More... | |
exint | getBlockSize () const |
Get the block size of the compressed blocks. More... | |
exint | getLastBlockSize () const |
Get the size of the last compressed block. More... | |
void | writeToStream (std::ostream *out) const |
Write index to stream. More... | |
void | readFromStream (UT_IStream *in, int64 indexLength) |
Read index from stream. More... | |
void | dump (const char *msg="") const |
Dump information. More... | |
Public Member Functions inherited from UT_IntrusiveRefCounter< UT_CompressedBlockIndex > | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter () noexcept |
Default constructor: Sets counter to 0. More... | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept |
Copy constructor: Sets counter to 0. More... | |
UT_IntrusiveRefCounter & | operator= (const UT_IntrusiveRefCounter &) noexcept |
Assignment operator: Does not modify counter. More... | |
SYS_FORCE_INLINE uint32 | use_count () const noexcept |
Return current counter. More... | |
SYS_FORCE_INLINE bool | conditionalAddRef () noexcept |
Additional Inherited Members | |
Protected Member Functions inherited from UT_IntrusiveRefCounter< UT_CompressedBlockIndex > | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
Definition at line 22 of file UT_CompressedBlockIndex.h.
UT_CompressedBlockIndex::UT_CompressedBlockIndex | ( | ) |
void UT_CompressedBlockIndex::append | ( | BlockLocationType | entry | ) |
Adds entry to the end of the index.
void UT_CompressedBlockIndex::dump | ( | const char * | msg = "" | ) | const |
Dump information.
exint UT_CompressedBlockIndex::getBlockNumberCompressedOffset | ( | BlockLocationType | compressedOffset | ) | const |
Get the block number given offset in compressed file.
exint UT_CompressedBlockIndex::getBlockSize | ( | ) | const |
Get the block size of the compressed blocks.
BlockLocationType UT_CompressedBlockIndex::getCompressedBlockOffset | ( | exint | uncompressedOffset | ) | const |
Retrieves the location of the start of the block containing the given offset in uncompressed file
BlockLocationType UT_CompressedBlockIndex::getCompressedBlockOffsetFromEnd | ( | exint | uncompressedOffsetFromEnd | ) | const |
Retrieves the location of the start of the block containing the given offset (given from the end of the file) in uncompressed file
exint UT_CompressedBlockIndex::getLastBlockSize | ( | ) | const |
Get the size of the last compressed block.
int64 UT_CompressedBlockIndex::getLength | ( | ) | const |
Get the length in the file of the entire index section (for seeking)
exint UT_CompressedBlockIndex::getTotalUncompressedSize | ( | ) | const |
Get's the total uncompressed size of the stream with this block index.
void UT_CompressedBlockIndex::readFromStream | ( | UT_IStream * | in, |
int64 | indexLength | ||
) |
Read index from stream.
void UT_CompressedBlockIndex::removeLast | ( | ) |
Removes the last entry.
Sets the blocksize and the size of the last block. Last block size used for end of stream calculations.
void UT_CompressedBlockIndex::writeToStream | ( | std::ostream * | out | ) | const |
Write index to stream.