Re-wrote a bunch to try to figure out why things weren't working.

Turned out I was reading if a block was compressed exactly opposite.
Started to work more on looking up dirs.
This commit is contained in:
Caleb Gardner
2020-11-16 14:56:19 -06:00
parent 06b188d53c
commit 7a2f9a87ba
25 changed files with 504 additions and 3363 deletions
+12
View File
@@ -0,0 +1,12 @@
package squashfs
//ProcessInodeRef processes an inode reference and returns two values
//
//The first value is the inode table offset. AKA, it's where the metadata block of the inode STARTS relative to the inode table.
//
//The second value is the offset of the inode, INSIDE of the metadata.
func processInodeRef(inodeRef uint64) (tableOffset uint64, metaOffset uint64) {
tableOffset = inodeRef >> 16
metaOffset = inodeRef &^ 0xFFFFFFFF0000
return
}