Somre more stuff for parsting
Working on metadata parsing Runnning into some Reader issues so I might create my own.
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
package squashfs
|
||||
|
||||
import "io"
|
||||
|
||||
const (
|
||||
zlibCompression = 1 + iota
|
||||
lzmaCompression
|
||||
lzoCompression
|
||||
xzCompression
|
||||
lz4Compression
|
||||
zstdCompression
|
||||
)
|
||||
|
||||
//TODO: implement decompress for each type of Options
|
||||
type CompressionOptions interface {
|
||||
Decompress([]byte) []byte
|
||||
DecompressCopy(*io.Reader, *io.Writer)
|
||||
Compress([]byte) []byte
|
||||
CompressCopy(*io.Reader, *io.Writer)
|
||||
}
|
||||
|
||||
//TODO: Allow creation of options for compression.
|
||||
@@ -24,6 +38,13 @@ type GzipOptions struct {
|
||||
FixedStretegy bool
|
||||
}
|
||||
|
||||
func NewGzipOptions(raw gzipOptionsRaw) GzipOptions {
|
||||
//TODO: parse strategies
|
||||
return GzipOptions{
|
||||
raw: &raw,
|
||||
}
|
||||
}
|
||||
|
||||
type xzOptionsRaw struct {
|
||||
dictionarySize int32
|
||||
executableFilters int32
|
||||
|
||||
Reference in New Issue
Block a user