Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Contains the result of a compression or extraction operation. More...
#include <StringCompression.h>
Public Types | |
using | Dynamic = std::unique_ptr< std::byte[]> |
using | Static = std::array< std::byte, 128 KiB > |
Public Member Functions | |
std::string_view | GetStringView () const |
Returns a view (of type char) of the internal store. More... | |
ContiguousByteBufferView | GetView () const |
Returns a view (of type std::byte) of the internal store. More... | |
Public Attributes | |
size_t | Size |
The length of valid data in the store. More... | |
std::variant< Static, Dynamic > | Storage |
A store allocated on either the stack or heap. More... | |
Static Public Attributes | |
static constexpr size_t | StaticCapacity = sizeof(Compression::Result::Static) / sizeof(Compression::Result::Static::value_type) |
Contains the result of a compression or extraction operation.
Definition at line 22 of file StringCompression.h.
using Compression::Result::Dynamic = std::unique_ptr<std::byte[]> |
Definition at line 25 of file StringCompression.h.
using Compression::Result::Static = std::array<std::byte, 128 KiB> |
Definition at line 24 of file StringCompression.h.
std::string_view Compression::Result::GetStringView | ( | ) | const |
Returns a view (of type char) of the internal store.
Definition at line 16 of file StringCompression.cpp.
ContiguousByteBufferView Compression::Result::GetView | ( | ) | const |
Returns a view (of type std::byte) of the internal store.
Definition at line 26 of file StringCompression.cpp.
size_t Compression::Result::Size |
The length of valid data in the store.
Definition at line 39 of file StringCompression.h.
|
staticconstexpr |
Definition at line 27 of file StringCompression.h.
A store allocated on either the stack or heap.
Definition at line 36 of file StringCompression.h.