Renamed files to make them more clear

Trying to figure out how to write. Might have to keep tables uncompressed for now.
This commit is contained in:
Caleb Gardner
2021-04-30 02:52:27 -05:00
parent 7cf15d48c7
commit 6ad6857d8d
11 changed files with 353 additions and 87 deletions
+15 -1
View File
@@ -1,6 +1,9 @@
package squashfs
import "io"
import (
"encoding/binary"
"io"
)
func (w *Writer) countInodes() (out uint32) {
out++ //for the root directory
@@ -10,6 +13,17 @@ func (w *Writer) countInodes() (out uint32) {
return
}
func (w *Writer) calculateInodeTableSize() (out int, err error) {
for _, files := range w.structure {
for i := range files {
_ = i
//set up each file's inode and add it's binary.size to out
out += binary.Size(files[i].inode)
}
}
return
}
func (w *Writer) writeInodeTable(wrt io.WriterAt, off int64) (newOff int64, err error) {
newOff = off
return