Documentation!
Though may functions/structs will be made private, I still want things documented.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user