class
#include <bsa/detail/common.hpp>
compressed_byte_container A byte storage container with compression support.
Base classes
- class basic_byte_container
- A basic byte storage container.
Derived classes
- class bsa::fo4::chunk final
- Represents a chunk of a file within the FO4 virtual filesystem.
- class bsa::tes4::file final
- Represents a file within the TES4 virtual filesystem.
Capacity
- auto empty() const -> bool noexcept
- Checks if the underlying byte container is empty.
-
auto size() const -> std::
size_t noexcept - Returns the size of the underlying byte container.
Decompression
-
auto decompressed_size() const -> std::
size_t noexcept - Retrieves the decompressed size of the compressed storage.
Element access
Modifiers
-
void set_data(std::
span<const std:: byte> a_data, std:: optional<std:: size_t> a_decompressedSize = std::nullopt) noexcept - Assigns the underlying container to be a non-owning view into the given data.
-
void set_data(std::
vector<std:: byte> a_data, std:: optional<std:: size_t> a_decompressedSize = std::nullopt) noexcept - Assigns the underlying container to be an owning view into the given data.
Observers
- auto compressed() const -> bool noexcept
- Checks if the underlying bytes are compressed.
Function documentation
std:: size_t bsa:: components:: compressed_byte_container:: decompressed_size() const noexcept
Retrieves the decompressed size of the compressed storage.
Only valid if the container is compressed.
void bsa:: components:: compressed_byte_container:: set_data(std:: span<const std:: byte> a_data,
std:: optional<std:: size_t> a_decompressedSize = std::nullopt) noexcept
Assigns the underlying container to be a non-owning view into the given data.
Parameters | |
---|---|
a_data | The data to store a view to. |
a_decompressedSize | The decompressed size of the data, if the given data is compressed. |
void bsa:: components:: compressed_byte_container:: set_data(std:: vector<std:: byte> a_data,
std:: optional<std:: size_t> a_decompressedSize = std::nullopt) noexcept
Assigns the underlying container to be an owning view into the given data.
Parameters | |
---|---|
a_data | The data to take ownership of. |
a_decompressedSize | The decompressed size of the data, if the given data is compressed. |