Working on how to actually write the archive.

Made SuperblockFlags public so you can set options when writing
This commit is contained in:
Caleb Gardner
2021-01-16 15:42:55 -06:00
parent 4187598783
commit 69f56d6951
5 changed files with 116 additions and 40 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import (
)
const (
magic = 0x73717368
magic uint32 = 0x73717368
)
var (
@@ -34,7 +34,7 @@ type Reader struct {
fragOffsets []uint64
idTable []uint32
super superblock
flags superblockFlags
flags SuperblockFlags
}
//NewSquashfsReader returns a new squashfs.Reader from an io.ReaderAt
@@ -53,7 +53,7 @@ func NewSquashfsReader(r io.ReaderAt) (*Reader, error) {
// return nil, errors.New("BlockSize and BlockLog doesn't match. The archive is probably corrupt")
// }
rdr.flags = rdr.super.GetFlags()
if rdr.flags.CompressorOptions {
if rdr.flags.compressorOptions {
switch rdr.super.CompressionType {
case GzipCompression:
var gzip *compression.Gzip