Added fragment calculations (untested).

This commit is contained in:
Caleb Gardner
2021-02-25 03:17:20 -06:00
parent ae5ade0683
commit c9d451e24c
5 changed files with 75 additions and 25 deletions
-14
View File
@@ -7,17 +7,3 @@ func (w *Writer) countInodes() (out uint32) {
}
return
}
//intilialize the block sizes. These values will be overwritten with their compressed sizes later.
func (w *Writer) calculateBlockSizes(fil *fileHolder) {
tmp := fil.size
for {
if tmp < uint64(w.BlockSize) {
fil.blockSizes = append(fil.blockSizes, uint32(tmp))
break
}
tmp -= uint64(w.BlockSize)
fil.blockSizes = append(fil.blockSizes, w.BlockSize)
}
return
}