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
@@ -9,6 +9,7 @@ const (
zstdCompression
)
//Superblock contains important information about a squashfs file. Located at the very front of the archive.
type Superblock struct {
Magic uint32
InodeCount uint32
@@ -31,6 +32,7 @@ type Superblock struct {
ExportTableStart uint64
}
//SuperblockFlags is the parsed version of Superblock.Flags
type SuperblockFlags struct {
UncompressedInodes bool
UncompressedData bool
@@ -46,6 +48,7 @@ type SuperblockFlags struct {
UncompressedIDs bool
}
//GetFlags returns a SuperblockFlags for a given superblock.
func (s *Superblock) GetFlags() SuperblockFlags {
return SuperblockFlags{
UncompressedInodes: s.Flags&0x1 == 0x1,