NBT: Allow parsing from compressed data
This commit is contained in:
parent
935d29a30d
commit
35f91c17a1
|
@ -164,6 +164,11 @@ namespace NBT
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CompoundTag::CompoundTag(const void* data, size_t length)
|
||||||
|
: CompoundTag(nbt_parse_compressed(data, length))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
CompoundTag::~CompoundTag()
|
CompoundTag::~CompoundTag()
|
||||||
{
|
{
|
||||||
nbt_free(m_node);
|
nbt_free(m_node);
|
||||||
|
|
|
@ -137,6 +137,10 @@ namespace NBT
|
||||||
CompoundTag(nbt_node* node) : Tag(node) {}
|
CompoundTag(nbt_node* node) : Tag(node) {}
|
||||||
|
|
||||||
CompoundTag(const char* filename);
|
CompoundTag(const char* filename);
|
||||||
|
|
||||||
|
// Read a compound tag from compressed data
|
||||||
|
CompoundTag(const void* data, size_t length);
|
||||||
|
|
||||||
~CompoundTag();
|
~CompoundTag();
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Reference in New Issue