Documentation!

Though may functions/structs will be made private, I still want things documented.
This commit is contained in:
Caleb Gardner
2020-11-25 01:15:54 -06:00
parent 4f058f2f31
commit af36f9b9aa
5 changed files with 16 additions and 1 deletions
+3
View File
@@ -6,12 +6,15 @@ import (
"io"
)
//Decompressor is a squashfs decompressor interface. Allows for easy decompression no matter the type of compression.
type Decompressor interface {
Decompress(io.Reader) ([]byte, error)
}
//ZlibDecompressor is a decompressor for gzip type compression
type ZlibDecompressor struct{}
//Decompress reads the entirety of the given reader and returns it uncompressed as a byte slice.
func (z *ZlibDecompressor) Decompress(r io.Reader) ([]byte, error) {
rdr, err := zlib.NewReader(r)
if err != nil {