Added uid/guid support.

Added permission support.
This commit is contained in:
Caleb Gardner
2021-01-09 02:30:04 -06:00
parent 4b3d5d12f8
commit b2d6ff56f6
3 changed files with 40 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
package squashfs
import "reflect"
func (w *Writer) compressData(data []byte) ([]byte, error) {
if reflect.DeepEqual(data, make([]byte, len(data))) {
return nil, nil
}
compressedData, err := w.compressor.Compress(data)
if err != nil {
return nil, err
}
if len(data) <= len(compressedData) {
return data, nil
}
return compressedData, nil
}