Module: RubyCraft::ZlibHelper

Extended by:
ZlibHelper
Included in:
Chunk, LazyChunkDelegate, NbtHelper, Region, ZlibHelper
Defined in:
lib/rubycraft/nbt_helper.rb

Instance Method Summary collapse

Instance Method Details

#compress(str) ⇒ Object



22
23
24
# File 'lib/rubycraft/nbt_helper.rb', line 22

def compress(str)
  Zlib::Deflate.deflate(str)
end

#decompress(str) ⇒ Object



26
27
28
# File 'lib/rubycraft/nbt_helper.rb', line 26

def decompress(str)
  Zlib::Inflate.inflate(str)
end