summaryrefslogtreecommitdiff
path: root/nbt/compressed.go
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-07 13:24:17 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-07 13:24:17 +0200
commit5a12f9e05c7cc608ba9685e50eabab21f7fc1f51 (patch)
tree5f0818ed492c80805c3df6c8fb4d1f46041583f7 /nbt/compressed.go
parente4f89ff0bbd93e355e4431264dee2b10b3ac27d1 (diff)
downloadgonbt-5a12f9e05c7cc608ba9685e50eabab21f7fc1f51.tar.gz
gonbt-5a12f9e05c7cc608ba9685e50eabab21f7fc1f51.tar.bz2
gonbt-5a12f9e05c7cc608ba9685e50eabab21f7fc1f51.zip
Adding some documentation
Diffstat (limited to 'nbt/compressed.go')
-rw-r--r--nbt/compressed.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/nbt/compressed.go b/nbt/compressed.go
index 3ca31f5..a16308f 100644
--- a/nbt/compressed.go
+++ b/nbt/compressed.go
@@ -8,6 +8,7 @@ import (
// Some helpers for reading / writing compressed NBT data, since NBT data is often compressed.
+// ReadGzipdNamedTag reads a gzip compressed named tag. See ReadNamedTags for more info.
func ReadGzipdNamedTag(r io.Reader) (Tag, string, error) {
decomp, err := gzip.NewReader(r)
if err != nil {
@@ -17,11 +18,13 @@ func ReadGzipdNamedTag(r io.Reader) (Tag, string, error) {
return ReadNamedTag(decomp)
}
+// WriteGzipdNamedTag writes a gzip compressed named tag. See WriteNamedTag for more info.
func WriteGzipdNamedTag(w io.Writer, name string, tag Tag) error {
comp := gzip.NewWriter(w)
return WriteNamedTag(comp, name, tag)
}
+// ReadZlibdNamedTag reads a zlib compressed named tag. See ReadNamedTags for more info.
func ReadZlibdNamedTag(r io.Reader) (Tag, string, error) {
decomp, err := zlib.NewReader(r)
if err != nil {
@@ -31,6 +34,7 @@ func ReadZlibdNamedTag(r io.Reader) (Tag, string, error) {
return ReadNamedTag(decomp)
}
+// WriteZlibdNamedTag writes a zlib compressed named tag. See WriteNamedTag for more info.
func WriteZlibdNamedTag(w io.Writer, name string, tag Tag) error {
comp := zlib.NewWriter(w)
return WriteNamedTag(comp, name, tag)