Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 426903a222 | |||
| dcb26057fa |
@@ -19,9 +19,11 @@ Thanks also to [distri's squashfs library](https://github.com/distr1/distri/tree
|
|||||||
* Basic gzip compression (Shouldn't be too hard to implement other, but for right now, this works)
|
* Basic gzip compression (Shouldn't be too hard to implement other, but for right now, this works)
|
||||||
* Listing all files via a string slice
|
* Listing all files via a string slice
|
||||||
|
|
||||||
# Not Working (Yet). Roughly in order.
|
# Not Working (Yet). Not necessarily in order.
|
||||||
|
|
||||||
* Reading the UID, GUID, Xatt, Compression Options, and Export tables.
|
* Rename repo so it's easier to import
|
||||||
|
* Provide an easy interface to find and list files and their properties
|
||||||
|
* Maybe squashfs.File
|
||||||
* Extracting files
|
* Extracting files
|
||||||
* from inodes.
|
* from inodes.
|
||||||
* from file info.
|
* from file info.
|
||||||
@@ -31,7 +33,12 @@ Thanks also to [distri's squashfs library](https://github.com/distr1/distri/tree
|
|||||||
* Implement other compression types (Should be relatively easy)
|
* Implement other compression types (Should be relatively easy)
|
||||||
* Squashing
|
* Squashing
|
||||||
* Threading processes to speed them up
|
* Threading processes to speed them up
|
||||||
|
* Reasonable tests
|
||||||
|
|
||||||
# Where I'm at.
|
# TODO
|
||||||
|
|
||||||
* I FINALLY GOT FILE EXTRACTION WORKING!!
|
* Go over all documentation again (especially for exported structs and functions) to make sure it's easy to understand.
|
||||||
|
|
||||||
|
# Where I'm at
|
||||||
|
|
||||||
|
* v0.1 is the first working version!
|
||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/CalebQ42/GoSquashfs/internal/inode"
|
"github.com/CalebQ42/squashfs/internal/inode"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/CalebQ42/GoSquashfs/internal/inode"
|
"github.com/CalebQ42/squashfs/internal/inode"
|
||||||
)
|
)
|
||||||
|
|
||||||
//FileReader provides a io.Reader interface for files within a squashfs archive
|
//FileReader provides a io.Reader interface for files within a squashfs archive
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/CalebQ42/GoSquashfs/internal/inode"
|
"github.com/CalebQ42/squashfs/internal/inode"
|
||||||
)
|
)
|
||||||
|
|
||||||
//FragmentEntry is an entry in the fragment table
|
//FragmentEntry is an entry in the fragment table
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
module github.com/CalebQ42/GoSquashfs
|
module github.com/CalebQ42/squashfs
|
||||||
|
|
||||||
go 1.15
|
go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/CalebQ42/GoAppImage v0.4.0
|
github.com/CalebQ42/GoAppImage v0.4.0
|
||||||
github.com/google/go-cmp v0.5.4 // indirect
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
github.com/CalebQ42/GoAppImage v0.4.0 h1:aF+Y/vyo/RGhoyZEW1CMY6WyRWrZZO4ydsRFAtIGnaY=
|
github.com/CalebQ42/GoAppImage v0.4.0 h1:aF+Y/vyo/RGhoyZEW1CMY6WyRWrZZO4ydsRFAtIGnaY=
|
||||||
github.com/CalebQ42/GoAppImage v0.4.0/go.mod h1:qHudJKAn/dlkNWNnH4h1YKXp29EZ7Bppsn7sNP2HuvU=
|
github.com/CalebQ42/GoAppImage v0.4.0/go.mod h1:qHudJKAn/dlkNWNnH4h1YKXp29EZ7Bppsn7sNP2HuvU=
|
||||||
|
github.com/CalebQ42/GoSquashfs v0.1.0 h1:1E6oeZLxGwjFgB0M5BcDD/IpKOQq1aO0gGsN0llCFoE=
|
||||||
|
github.com/CalebQ42/GoSquashfs v0.1.0/go.mod h1:NzAR1YC1SVKOKhRao5IiWY3GhOMI+IxBy1xeZJeVKlQ=
|
||||||
github.com/adrg/xdg v0.2.2 h1:A7ZHKRz5KGOLJX/bg7IPzStryhvCzAE1wX+KWawPiAo=
|
github.com/adrg/xdg v0.2.2 h1:A7ZHKRz5KGOLJX/bg7IPzStryhvCzAE1wX+KWawPiAo=
|
||||||
github.com/adrg/xdg v0.2.2/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
|
github.com/adrg/xdg v0.2.2/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -7,8 +9,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
|||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
|
|
||||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
|
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
|
||||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/CalebQ42/GoSquashfs/internal/inode"
|
"github.com/CalebQ42/squashfs/internal/inode"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
+3
-6
@@ -1,7 +1,6 @@
|
|||||||
package squashfs
|
package squashfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@@ -13,7 +12,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
downloadURL = "https://github.com/zilti/code-oss.AppImage/releases/download/continuous/Code_OSS-x86_64.AppImage"
|
downloadURL = "https://github.com/zilti/code-oss.AppImage/releases/download/continuous/Code_OSS-x86_64.AppImage"
|
||||||
appImageName = "Code_OSS.AppImage"
|
appImageName = "Code_OSS.AppImage"
|
||||||
squashfsName = "testing.squashfs"
|
squashfsName = "Code_OSS.Squashfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(t *testing.T) {
|
func TestMain(t *testing.T) {
|
||||||
@@ -38,7 +37,7 @@ func TestMain(t *testing.T) {
|
|||||||
}
|
}
|
||||||
//testing code to print out the directory structure
|
//testing code to print out the directory structure
|
||||||
// rdr.GetFileStructure()
|
// rdr.GetFileStructure()
|
||||||
extractionFil := "Proton-5.9-GE-8-ST.tar.gz"
|
extractionFil := "code-oss.desktop"
|
||||||
os.Remove(wd + "/testing/" + extractionFil)
|
os.Remove(wd + "/testing/" + extractionFil)
|
||||||
desk, err := os.Create(wd + "/testing/" + extractionFil)
|
desk, err := os.Create(wd + "/testing/" + extractionFil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -48,10 +47,8 @@ func TestMain(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
fmt.Println("Size!", ext.FileSize)
|
_, err = io.Copy(desk, ext)
|
||||||
n, err := io.CopyBuffer(desk, ext, make([]byte, rdr.super.BlockSize/2))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Read", n)
|
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
t.Fatal("No problems here!")
|
t.Fatal("No problems here!")
|
||||||
|
|||||||
Reference in New Issue
Block a user