Repository: zarf-dev/zarf (Go)

Issue:
Explore future of mholt/archiver
### Describe what should be investigated or refactored

We are currently using a mix of stdliib tar and https://github.com/mholt/archiver to manage tar archives. The archiver lib has a lot of good features to partially unpack tar files. The latest release of the lib was made in November 2021 with work for a new major release still in progress.

There are a couple of small bugs that we have found in mholt/archiver when run on Windows. Considering the lack of releases we should consider the future of using the lib, and consider if we should only use the stdlib or some other lib.



Discussion:
archiver has now been archived and replaced by archives

https://github.com/mholt/archives
Before migrating to archives, we should consider how much we actually rely on from that library, vs what we can achieve from the golang built-in one. 
One potential issue with getting changing out mholt/archiver with the native golang is that archiver/archives allows compressions / decompression to any file type. This is important when considering `zarf tools archiver compress` and `zarf tools archiver decompress`. We know that with Zarf packages this command is used for `.tar` and `.zst` extensions, but it's possible that are users are using this tool for other file types as well



Patch:
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 38d07f5554..668409d8a4 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -28,7 +28,7 @@ builds:
       - -X github.com/derailed/k9s/cmd.version={{.Env.K9S_VERSION}}
       - -X github.com/google/go-containerregistry/cmd/crane/cmd.Version={{.Env.CRANE_VERSION}}
       - -X github.com/zarf-dev/zarf/src/cmd.syftVersion={{.Env.SYFT_VERSION}}
-      - -X github.com/zarf-dev/zarf/src/cmd.archiverVersion={{.Env.ARCHIVER_VERSION}}
+      - -X github.com/zarf-dev/zarf/src/cmd.archivesVersion={{.Env.ARCHIVES_VERSION}}
       - -X github.com/zarf-dev/zarf/src/cmd.helmVersion={{.Env.HELM_VERSION}}
     goarch:
       - amd64
diff --git a/Makefile b/Makefile
index 99b044a9f2..1f9096dd7e 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ K8S_MODULES_PATCH_VER=$(word 3,$(K8S_MODULES_VER))
 K9S_VERSION=$(shell go list -f '{{.Version}}' -m github.com/derailed/k9s)
 CRANE_VERSION=$(shell go list -f '{{.Version}}' -m github.com/google/go-containerregistry)
 SYFT_VERSION=$(shell go list -f '{{.Version}}' -m github.com/anchore/syft)
-ARCHIVER_VERSION=$(shell go list -f '{{.Version}}' -m github.com/mholt/archiver/v3)
+ARCHIVES_VERSION=$(shell go list -f '{{.Version}}' -m github.com/mholt/archives)
 HELM_VERSION=$(shell go list -f '{{.Version}}' -m helm.sh/helm/v3)
 
 BUILD_ARGS += -X helm.sh/helm/v3/pkg/lint/rules.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER)
@@ -49,7 +49,7 @@ BUILD_ARGS += -X k8s.io/component-base/version.gitVersion=v$(K8S_MODULES_MAJOR_V
 BUILD_ARGS += -X github.com/derailed/k9s/cmd.version=$(K9S_VERSION)
 BUILD_ARGS += -X github.com/google/go-containerregistry/cmd/crane/cmd.Version=$(CRANE_VERSION)
 BUILD_ARGS += -X github.com/zarf-dev/zarf/src/cmd.syftVersion=$(SYFT_VERSION)
-BUILD_ARGS += -X github.com/zarf-dev/zarf/src/cmd.archiverVersion=$(ARCHIVER_VERSION)
+BUILD_ARGS += -X github.com/zarf-dev/zarf/src/cmd.archivesVersion=$(ARCHIVES_VERSION)
 BUILD_ARGS += -X github.com/zarf-dev/zarf/src/cmd.helmVersion=$(HELM_VERSION)
 
 GIT_SHA := $(if $(shell git rev-parse HEAD),$(shell git rev-parse HEAD),"")
diff --git a/go.mod b/go.mod
index 0790d5da0e..f834baa91e 100644
--- a/go.mod
+++ b/go.mod
@@ -33,7 +33,6 @@ require (
 	github.com/golang-cz/devslog v0.0.13
 	github.com/google/go-containerregistry v0.20.4-0.20250225234217-098045d5e61f
 	github.com/gosuri/uitable v0.0.4
-	github.com/mholt/archiver/v3 v3.5.1
 	github.com/mholt/archives v0.1.1
 	github.com/opencontainers/image-spec v1.1.1
 	github.com/phsym/console-slog v0.3.1
@@ -462,7 +461,7 @@ require (
 	github.com/oklog/ulid v1.3.1 // indirect
 	github.com/oleiade/reflections v1.1.0 // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
-	github.com/open-policy-agent/opa v0.68.0
+	github.com/open-policy-agent/opa v0.68.0 // indirect
 	github.com/opencontainers/go-digest v1.0.0 // indirect
 	github.com/opencontainers/runtime-spec v1.1.0 // indirect
 	github.com/opencontainers/selinux v1.11.0 // indirect
diff --git a/go.sum b/go.sum
index 20b5531b45..0261cf93ff 100644
--- a/go.sum
+++ b/go.sum
@@ -427,7 +427,6 @@ github.com/anchore/stereoscope v0.1.4/go.mod h1:omWgXDEp/XfqCJlZXIByEo1c3ArZg/qT
 github.com/anchore/syft v1.23.1 h1:QFWFMlwyJprl60RMrceSB6FJpZCsAQeWVLd9Ltzgwa0=
 github.com/anchore/syft v1.23.1/go.mod h1:vDV0VBC601wHZ2nGuxqoDjfYsiu87WmE0w8HG3RDI6k=
 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
-github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
 github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
 github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
 github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
@@ -728,7 +727,6 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
 github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
 github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
-github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
 github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4=
 github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
 github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
@@ -978,7 +976,6 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx
 github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
 github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
 github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
-github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
 github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -1243,7 +1240,6 @@ github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXw
 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
 github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
 github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
 github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
@@ -1254,7 +1250,6 @@ github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuOb
 github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
 github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU=
 github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
-github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
 github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
 github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
 github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f h1:GvCU5GXhHq+7LeOzx/haG7HSIZokl3/0GkoUFzsRJjg=
@@ -1343,8 +1338,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
 github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
 github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
 github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
-github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo=
-github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4=
 github.com/mholt/archives v0.1.1 h1:c7J3qXN1FB54y0qiUXiq9Bxk4eCUc8pdXWwOhZdRzeY=
 github.com/mholt/archives v0.1.1/go.mod h1:FQVz01Q2uXKB/35CXeW/QFO23xT+hSCGZHVtha78U4I=
 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -1432,7 +1425,6 @@ github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJm
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
 github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 h1:Up6+btDp321ZG5/zdSLo48H9Iaq0UQGthrhWC6pCxzE=
 github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481/go.mod h1:yKZQO8QE2bHlgozqWDiRVqTFlLQSj30K/6SAK8EeYFw=
-github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
 github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc=
 github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
 github.com/nwaples/rardecode/v2 v2.1.0 h1:JQl9ZoBPDy+nIZGb1mx8+anfHp/LV3NE2MjMiv0ct/U=
@@ -1508,7 +1500,6 @@ github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1H
 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
 github.com/phsym/console-slog v0.3.1 h1:Fuzcrjr40xTc004S9Kni8XfNsk+qrptQmyR+wZw9/7A=
 github.com/phsym/console-slog v0.3.1/go.mod h1:oJskjp/X6e6c0mGpfP8ELkfKUsrkDifYRAqJQgmdDS0=
-github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
 github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
 github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
 github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=
@@ -1770,7 +1761,6 @@ github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG
 github.com/transparency-dev/merkle v0.0.2/go.mod h1:pqSy+OXefQ1EDUVmAJ8MUhHB9TXGuzVAT58PqBoHz1A=
 github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
 github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
-github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
 github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
 github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
 github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
diff --git a/src/cmd/archiver.go b/src/cmd/archiver.go
index 040b4da4ce..53d4ccdaca 100644
--- a/src/cmd/archiver.go
+++ b/src/cmd/archiver.go
@@ -10,21 +10,20 @@ import (
 	"github.com/zarf-dev/zarf/src/pkg/archive"
 )
 
-// ldflags github.com/zarf-dev/zarf/src/cmd.archiverVersion=x.x.x
-var archiverVersion string
+// ldflags github.com/zarf-dev/zarf/src/cmd.archivesVersion=x.x.x
+var archivesVersion string
 
 func newArchiverCommand() *cobra.Command {
 	cmd := &cobra.Command{
 		Use:     "archiver",
 		Aliases: []string{"a"},
 		Short:   lang.CmdToolsArchiverShort,
-		Version: archiverVersion,
+		Version: archivesVersion,
 	}
 
 	cmd.AddCommand(newArchiverCompressCommand())
 	cmd.AddCommand(newArchiverDecompressCommand())
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	cmd.AddCommand(newToolsVersionCmd("mholt/archives", archiverVersion))
+	cmd.AddCommand(newToolsVersionCmd("mholt/archives", archivesVersion))
 
 	return cmd
 }
diff --git a/src/cmd/dev.go b/src/cmd/dev.go
index 8989c4b2df..aa4baca83d 100644
--- a/src/cmd/dev.go
+++ b/src/cmd/dev.go
@@ -17,7 +17,6 @@ import (
 	"github.com/AlecAivazis/survey/v2"
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	goyaml "github.com/goccy/go-yaml"
-	"github.com/mholt/archiver/v3"
 	"github.com/pterm/pterm"
 	"github.com/sergi/go-diff/diffmatchpatch"
 	"github.com/spf13/cobra"
@@ -27,6 +26,7 @@ import (
 	"github.com/zarf-dev/zarf/src/config/lang"
 	"github.com/zarf-dev/zarf/src/internal/packager2"
 	layout2 "github.com/zarf-dev/zarf/src/internal/packager2/layout"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/lint"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
@@ -484,6 +484,7 @@ func newDevSha256SumCommand() *cobra.Command {
 
 func (o *devSha256SumOptions) run(cmd *cobra.Command, args []string) (err error) {
 	hashErr := errors.New("unable to compute the SHA256SUM hash")
+	ctx := cmd.Context()
 
 	fileName := args[0]
 
@@ -508,7 +509,7 @@ func (o *devSha256SumOptions) run(cmd *cobra.Command, args []string) (err error)
 		}
 
 		downloadPath := filepath.Join(tmp, fileBase)
-		err = utils.DownloadToFile(cmd.Context(), fileName, downloadPath, "")
+		err = utils.DownloadToFile(ctx, fileName, downloadPath, "")
 		if err != nil {
 			return errors.Join(hashErr, err)
 		}
@@ -535,8 +536,10 @@ func (o *devSha256SumOptions) run(cmd *cobra.Command, args []string) (err error)
 
 		extractedFile := filepath.Join(tmp, o.extractPath)
 
-		// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-		err = archiver.Extract(fileName, o.extractPath, tmp)
+		decompressOpts := archive.DecompressOpts{
+			Files: []string{extractedFile},
+		}
+		err = archive.Decompress(ctx, fileName, tmp, decompressOpts)
 		if err != nil {
 			return errors.Join(hashErr, err)
 		}
diff --git a/src/internal/packager2/create.go b/src/internal/packager2/create.go
index e9f163bb82..3af60306f3 100644
--- a/src/internal/packager2/create.go
+++ b/src/internal/packager2/create.go
@@ -72,7 +72,7 @@ func Create(ctx context.Context, packagePath string, opt CreateOptions) error {
 	}
 
 	if opt.SBOMOut != "" {
-		_, err := pkgLayout.GetSBOM(opt.SBOMOut)
+		_, err := pkgLayout.GetSBOM(ctx, opt.SBOMOut)
 		// Don't fail package create if the package doesn't have an sbom
 		var noSBOMErr *layout2.NoSBOMAvailableError
 		if errors.As(err, &noSBOMErr) {
diff --git a/src/internal/packager2/inspect.go b/src/internal/packager2/inspect.go
index cf4e6cb93b..b84f9bc059 100644
--- a/src/internal/packager2/inspect.go
+++ b/src/internal/packager2/inspect.go
@@ -107,11 +107,11 @@ func InspectPackageResources(ctx context.Context, source string, opts InspectPac
 		variableConfig.SetApplicationTemplates(applicationTemplates)
 
 		if len(component.Charts) > 0 {
-			chartDir, err := pkgLayout.GetComponentDir(tmpComponentPath, component.Name, layout.ChartsComponentDir)
+			chartDir, err := pkgLayout.GetComponentDir(ctx, tmpComponentPath, component.Name, layout.ChartsComponentDir)
 			if err != nil {
 				return InspectPackageResourcesResults{}, err
 			}
-			valuesDir, err := pkgLayout.GetComponentDir(tmpComponentPath, component.Name, layout.ValuesComponentDir)
+			valuesDir, err := pkgLayout.GetComponentDir(ctx, tmpComponentPath, component.Name, layout.ValuesComponentDir)
 			if err != nil && !errors.Is(err, os.ErrNotExist) {
 				return InspectPackageResourcesResults{}, fmt.Errorf("failed to get values: %w", err)
 			}
@@ -156,7 +156,7 @@ func InspectPackageResources(ctx context.Context, source string, opts InspectPac
 		}
 
 		if len(component.Manifests) > 0 {
-			manifestDir, err := pkgLayout.GetComponentDir(tmpComponentPath, component.Name, layout.ManifestsComponentDir)
+			manifestDir, err := pkgLayout.GetComponentDir(ctx, tmpComponentPath, component.Name, layout.ManifestsComponentDir)
 			if err != nil {
 				return InspectPackageResourcesResults{}, fmt.Errorf("failed to get package manifests: %w", err)
 			}
@@ -311,7 +311,7 @@ func InspectPackageSboms(ctx context.Context, source string, opts InspectPackage
 	defer func() {
 		err = errors.Join(err, pkgLayout.Cleanup())
 	}()
-	outputPath, err := pkgLayout.GetSBOM(opts.OutputDir)
+	outputPath, err := pkgLayout.GetSBOM(ctx, opts.OutputDir)
 	if err != nil {
 		return InspectPackageSbomsResult{}, fmt.Errorf("could not get SBOM: %w", err)
 	}
diff --git a/src/internal/packager2/layout/create.go b/src/internal/packager2/layout/create.go
index 20fb10be60..32f25caca7 100644
--- a/src/internal/packager2/layout/create.go
+++ b/src/internal/packager2/layout/create.go
@@ -23,7 +23,6 @@ import (
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	goyaml "github.com/goccy/go-yaml"
-	"github.com/mholt/archiver/v3"
 	"github.com/sigstore/cosign/v2/cmd/cosign/cli/options"
 	"github.com/sigstore/cosign/v2/cmd/cosign/cli/sign"
 
@@ -36,6 +35,7 @@ import (
 	"github.com/zarf-dev/zarf/src/internal/packager/kustomize"
 	actions2 "github.com/zarf-dev/zarf/src/internal/packager2/actions"
 	"github.com/zarf-dev/zarf/src/internal/packager2/filters"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/interactive"
 	"github.com/zarf-dev/zarf/src/pkg/lint"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
@@ -228,7 +228,7 @@ func CreateSkeleton(ctx context.Context, packagePath string, opt CreateOptions)
 	}
 
 	for _, component := range pkg.Components {
-		err := assembleSkeletonComponent(component, packagePath, buildPath)
+		err := assembleSkeletonComponent(ctx, component, packagePath, buildPath)
 		if err != nil {
 			return "", err
 		}
@@ -406,8 +406,10 @@ func assemblePackageComponent(ctx context.Context, component v1alpha1.ZarfCompon
 				if err := utils.DownloadToFile(ctx, file.Source, compressedFile, component.DeprecatedCosignKeyPath); err != nil {
 					return fmt.Errorf(lang.ErrDownloading, file.Source, err.Error())
 				}
-				// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-				err = archiver.Extract(compressedFile, file.ExtractPath, destinationDir)
+				decompressOpts := archive.DecompressOpts{
+					Files: []string{file.ExtractPath},
+				}
+				err = archive.Decompress(ctx, compressedFile, destinationDir, decompressOpts)
 				if err != nil {
 					return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, compressedFileName, err.Error())
 				}
@@ -418,9 +420,12 @@ func assemblePackageComponent(ctx context.Context, component v1alpha1.ZarfCompon
 			}
 		} else {
 			if file.ExtractPath != "" {
-				// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-				if err := archiver.Extract(filepath.Join(packagePath, file.Source), file.ExtractPath, destinationDir); err != nil {
-					return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, file.Source, err.Error())
+				decompressOpts := archive.DecompressOpts{
+					Files: []string{file.ExtractPath},
+				}
+				err = archive.Decompress(ctx, filepath.Join(packagePath, file.Source), destinationDir, decompressOpts)
+				if err != nil {
+					return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, filepath.Join(packagePath, file.Source), err.Error())
 				}
 			} else {
 				if filepath.IsAbs(file.Source) {
@@ -552,7 +557,7 @@ func assemblePackageComponent(ctx context.Context, component v1alpha1.ZarfCompon
 	return nil
 }
 
-func assembleSkeletonComponent(component v1alpha1.ZarfComponent, packagePath, buildPath string) error {
+func assembleSkeletonComponent(ctx context.Context, component v1alpha1.ZarfComponent, packagePath, buildPath string) error {
 	tmpBuildPath, err := utils.MakeTempDir(config.CommonOptions.TempDirectory)
 	if err != nil {
 		return err
@@ -611,9 +616,12 @@ func assembleSkeletonComponent(component v1alpha1.ZarfComponent, packagePath, bu
 		destinationDir := filepath.Dir(dst)
 
 		if file.ExtractPath != "" {
-			// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-			if err := archiver.Extract(filepath.Join(packagePath, file.Source), file.ExtractPath, destinationDir); err != nil {
-				return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, file.Source, err.Error())
+			decompressOpts := archive.DecompressOpts{
+				Files: []string{file.ExtractPath},
+			}
+			err = archive.Decompress(ctx, filepath.Join(packagePath, file.Source), destinationDir, decompressOpts)
+			if err != nil {
+				return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, filepath.Join(packagePath, file.Source), err.Error())
 			}
 
 			// Make sure dst reflects the actual file or directory.
diff --git a/src/internal/packager2/layout/import.go b/src/internal/packager2/layout/import.go
index dcf9fa2ac2..0884cf3204 100644
--- a/src/internal/packager2/layout/import.go
+++ b/src/internal/packager2/layout/import.go
@@ -13,11 +13,11 @@ import (
 	"strings"
 	"time"
 
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	"github.com/defenseunicorns/pkg/oci"
-	"github.com/mholt/archiver/v3"
 	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
 	ocistore "oras.land/oras-go/v2/content/oci"
 
@@ -285,16 +285,15 @@ func fetchOCISkeleton(ctx context.Context, component v1alpha1.ZarfComponent, pac
 		return rel, nil
 	}
 
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	tu := archiver.Tar{
+	decompressOpts := archive.DecompressOpts{
 		OverwriteExisting: true,
-		// removes /<component-name>/ from the paths
-		StripComponents: 1,
+		StripComponents:   1,
 	}
-	err = tu.Unarchive(tarball, dir)
+	err = archive.Decompress(ctx, tarball, dir, decompressOpts)
 	if err != nil {
-		return "", err
+		return "", fmt.Errorf("unable to extract archive %q: %w", tarball, err)
 	}
+
 	return rel, nil
 }
 
diff --git a/src/internal/packager2/layout/package.go b/src/internal/packager2/layout/package.go
index ead18f0015..9928f475bf 100644
--- a/src/internal/packager2/layout/package.go
+++ b/src/internal/packager2/layout/package.go
@@ -4,7 +4,6 @@
 package layout
 
 import (
-	"archive/tar"
 	"context"
 	"errors"
 	"fmt"
@@ -17,13 +16,14 @@ import (
 	"strings"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
-	"github.com/mholt/archiver/v3"
+	"github.com/mholt/archives"
 	"github.com/sigstore/cosign/v2/cmd/cosign/cli/options"
 	"github.com/sigstore/cosign/v2/cmd/cosign/cli/verify"
 
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
 	"github.com/zarf-dev/zarf/src/internal/packager2/filters"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/packager/sources"
 	"github.com/zarf-dev/zarf/src/pkg/utils"
@@ -43,7 +43,7 @@ type PackageLayoutOptions struct {
 	Filter                  filters.ComponentFilterStrategy
 }
 
-// LoadFromTar unpacks the give compressed package and loads it.
+// LoadFromTar unpacks the given archive (any compress/format) and loads it.
 func LoadFromTar(ctx context.Context, tarPath string, opt PackageLayoutOptions) (*PackageLayout, error) {
 	if opt.Filter == nil {
 		opt.Filter = filters.Empty()
@@ -52,42 +52,51 @@ func LoadFromTar(ctx context.Context, tarPath string, opt PackageLayoutOptions)
 	if err != nil {
 		return nil, err
 	}
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Walk(tarPath, func(f archiver.File) error {
-		if f.IsDir() {
-			return nil
+
+	// 1) Mount the archive as a virtual file system.
+	fsys, err := archives.FileSystem(ctx, tarPath, nil)
+	if err != nil {
+		return nil, fmt.Errorf("unable to open archive %q: %w", tarPath, err)
+	}
+
+	// 2) Walk every entry in the archive.
+	err = fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error {
+		if err != nil {
+			return err
 		}
-		header, ok := f.Header.(*tar.Header)
-		if !ok {
-			return fmt.Errorf("expected header to be *tar.Header but was %T", f.Header)
+		// skip directories
+		if d.IsDir() {
+			return nil
 		}
-		// If path has nested directories we want to create them.
-		dir := filepath.Dir(header.Name)
-		if dir != "." {
-			err := os.MkdirAll(filepath.Join(dirPath, dir), helpers.ReadExecuteAllWriteUser)
-			if err != nil {
-				return err
-			}
+		// ensure parent dirs exist in our temp dir
+		dst := filepath.Join(dirPath, path)
+		if err := os.MkdirAll(filepath.Dir(dst), helpers.ReadExecuteAllWriteUser); err != nil {
+			return err
 		}
-		dst, err := os.Create(filepath.Join(dirPath, header.Name))
+		// copy file contents
+		in, err := fsys.Open(path)
 		if err != nil {
 			return err
 		}
-		defer dst.Close()
-		_, err = io.Copy(dst, f)
+		defer in.Close()
+
+		out, err := os.Create(dst)
 		if err != nil {
 			return err
 		}
+		defer out.Close()
+
+		if _, err := io.Copy(out, in); err != nil {
+			return err
+		}
 		return nil
 	})
 	if err != nil {
 		return nil, err
 	}
-	p, err := LoadFromDir(ctx, dirPath, opt)
-	if err != nil {
-		return nil, err
-	}
-	return p, nil
+
+	// 3) Delegate to the existing LoadFromDir
+	return LoadFromDir(ctx, dirPath, opt)
 }
 
 // LoadFromDir loads and validates a package from the given directory path.
@@ -140,22 +149,27 @@ func (e *NoSBOMAvailableError) Error() string {
 	return fmt.Sprintf("zarf package %s does not have an SBOM available", e.pkgName)
 }
 
-// GetSBOM outputs the SBOM data from the package to the give destination path.
-func (p *PackageLayout) GetSBOM(destPath string) (string, error) {
+// GetSBOM outputs the SBOM data from the package to the given destination path.
+func (p *PackageLayout) GetSBOM(ctx context.Context, destPath string) (string, error) {
 	if !p.Pkg.IsSBOMAble() {
 		return "", &NoSBOMAvailableError{pkgName: p.Pkg.Metadata.Name}
 	}
-	path := filepath.Join(destPath, p.Pkg.Metadata.Name)
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err := archiver.Extract(filepath.Join(p.dirPath, SBOMTar), "", path)
+
+	// 1) locate the sboms archive under the layout directory
+	sbomArchive := filepath.Join(p.dirPath, SBOMTar)
+
+	// // 2) decompress the archive to destination path
+	targetDir := filepath.Join(destPath, p.Pkg.Metadata.Name)
+	err := archive.Decompress(ctx, sbomArchive, targetDir, archive.DecompressOpts{})
 	if err != nil {
 		return "", err
 	}
-	return path, nil
+
+	return targetDir, nil
 }
 
 // GetComponentDir returns a path to the directory in the given component.
-func (p *PackageLayout) GetComponentDir(destPath, componentName string, ct ComponentDir) (string, error) {
+func (p *PackageLayout) GetComponentDir(ctx context.Context, destPath, componentName string, ct ComponentDir) (string, error) {
 	sourcePath := filepath.Join(p.dirPath, ComponentsDir, fmt.Sprintf("%s.tar", componentName))
 	_, err := os.Stat(sourcePath)
 	if errors.Is(err, os.ErrNotExist) {
@@ -169,9 +183,7 @@ func (p *PackageLayout) GetComponentDir(destPath, componentName string, ct Compo
 		return "", err
 	}
 	defer os.RemoveAll(tmpDir)
-	// TODO (phillebaba): We are not using archiver.Extract here because there is a bug in Windows where the files will not be extracted properly from nested directories.
-	// https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Unarchive(sourcePath, tmpDir)
+	err = archive.Decompress(ctx, sourcePath, tmpDir, archive.DecompressOpts{})
 	if err != nil {
 		return "", err
 	}
@@ -212,8 +224,7 @@ func (p *PackageLayout) Archive(ctx context.Context, dirPath string, maxPackageS
 	for _, file := range files {
 		filePaths = append(filePaths, filepath.Join(p.dirPath, file.Name()))
 	}
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Archive(filePaths, tarballPath)
+	err = archive.Compress(ctx, filePaths, tarballPath, archive.CompressOpts{})
 	if err != nil {
 		return fmt.Errorf("unable to create package: %w", err)
 	}
diff --git a/src/internal/packager2/layout/sbom.go b/src/internal/packager2/layout/sbom.go
index 64c6c9f4db..ad673f10ca 100644
--- a/src/internal/packager2/layout/sbom.go
+++ b/src/internal/packager2/layout/sbom.go
@@ -27,10 +27,10 @@ import (
 	"github.com/anchore/syft/syft/source/stereoscopesource"
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/mholt/archiver/v3"
 
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/transform"
 	"github.com/zarf-dev/zarf/src/pkg/utils"
@@ -153,8 +153,7 @@ func createFileSBOM(ctx context.Context, component v1alpha1.ZarfComponent, outpu
 	}
 	defer os.RemoveAll(tmpDir)
 	tarPath := filepath.Join(buildPath, ComponentsDir, component.Name) + ".tar"
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Unarchive(tarPath, tmpDir)
+	err = archive.Decompress(ctx, tarPath, tmpDir, archive.DecompressOpts{})
 	if err != nil {
 		return nil, err
 	}
diff --git a/src/internal/packager2/mirror.go b/src/internal/packager2/mirror.go
index 7c815cd340..240a624020 100644
--- a/src/internal/packager2/mirror.go
+++ b/src/internal/packager2/mirror.go
@@ -96,7 +96,7 @@ func pushReposToRepository(ctx context.Context, c *cluster.Cluster, pkgLayout *l
 				return err
 			}
 			defer os.RemoveAll(tmpDir)
-			reposPath, err := pkgLayout.GetComponentDir(tmpDir, component.Name, layout.RepoComponentDir)
+			reposPath, err := pkgLayout.GetComponentDir(ctx, tmpDir, component.Name, layout.RepoComponentDir)
 			if err != nil {
 				return err
 			}
diff --git a/src/internal/packager2/pull.go b/src/internal/packager2/pull.go
index 9881d76205..b87fd9ff8e 100644
--- a/src/internal/packager2/pull.go
+++ b/src/internal/packager2/pull.go
@@ -15,13 +15,14 @@ import (
 	"strings"
 	"time"
 
+	"github.com/mholt/archives"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	"github.com/defenseunicorns/pkg/oci"
 	"github.com/gabriel-vasile/mimetype"
 	goyaml "github.com/goccy/go-yaml"
-	"github.com/mholt/archiver/v3"
 	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
 
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
@@ -125,7 +126,7 @@ func Pull(ctx context.Context, source, destination string, opts PullOptions) err
 		return err
 	}
 
-	name, err := nameFromMetadata(tmpPath)
+	name, err := nameFromMetadata(ctx, tmpPath)
 	if err != nil {
 		return err
 	}
@@ -228,8 +229,7 @@ func pullOCI(ctx context.Context, opts PullOCIOptions) (bool, string, error) {
 	if err != nil {
 		return false, "", err
 	}
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Archive(allTheLayers, tarPath)
+	err = archive.Compress(ctx, allTheLayers, tarPath, archive.CompressOpts{})
 	if err != nil {
 		return false, "", err
 	}
@@ -308,28 +308,44 @@ func pullHTTPFile(ctx context.Context, src, tarPath string) error {
 	return nil
 }
 
-func nameFromMetadata(path string) (string, error) {
-	var pkg v1alpha1.ZarfPackage
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err := archiver.Walk(path, func(f archiver.File) error {
-		if f.Name() == layout.ZarfYAML {
-			b, err := io.ReadAll(f)
-			if err != nil {
-				return err
-			}
-			if err := goyaml.Unmarshal(b, &pkg); err != nil {
-				return err
-			}
-		}
-		return nil
-	})
+// nameFromMetadata reads the zarf.yaml inside the archive at "path"
+// (which may be plain, .tar, .tar.zst, .zip, etc) and builds its package name.
+func nameFromMetadata(ctx context.Context, path string) (string, error) {
+	// 1) quick invalid‐path check
+	if helpers.InvalidPath(path) {
+		return "", &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist}
+	}
+	if ctx == nil {
+		ctx = context.Background()
+	}
+
+	// 2) mount the archive as a virtual file system
+	fsys, err := archives.FileSystem(ctx, path, nil)
+	if err != nil {
+		return "", fmt.Errorf("unable to open archive %q: %w", path, err)
+	}
+
+	// 3) open just the zarf.yaml entry
+	f, err := fsys.Open(layout.ZarfYAML)
+	if err != nil {
+		return "", fmt.Errorf("%s does not contain a %s", path, layout.ZarfYAML)
+	}
+	defer f.Close()
+
+	// 4) read & unmarshal into our package struct
+	data, err := io.ReadAll(f)
 	if err != nil {
 		return "", err
 	}
+	var pkg v1alpha1.ZarfPackage
+	if err := goyaml.Unmarshal(data, &pkg); err != nil {
+		return "", err
+	}
 	if pkg.Metadata.Name == "" {
 		return "", fmt.Errorf("%s does not contain a zarf.yaml", path)
 	}
 
+	// 5) build the output name exactly as before
 	arch := config.GetArch(pkg.Metadata.Architecture, pkg.Build.Architecture)
 	if pkg.Build.Architecture == zoci.SkeletonArch {
 		arch = zoci.SkeletonArch
@@ -345,14 +361,17 @@ func nameFromMetadata(path string) (string, error) {
 		name = fmt.Sprintf("zarf-%s-%s", strings.ToLower(string(pkg.Kind)), arch)
 	}
 	if pkg.Build.Differential {
-		name = fmt.Sprintf("%s-%s-differential-%s", name, pkg.Build.DifferentialPackageVersion, pkg.Metadata.Version)
+		name = fmt.Sprintf("%s-%s-differential-%s",
+			name, pkg.Build.DifferentialPackageVersion, pkg.Metadata.Version)
 	} else if pkg.Metadata.Version != "" {
 		name = fmt.Sprintf("%s-%s", name, pkg.Metadata.Version)
 	}
+
+	// 6) choose tar vs tar.zst
 	if pkg.Metadata.Uncompressed {
-		return fmt.Sprintf("%s.tar", name), nil
+		return name + ".tar", nil
 	}
-	return fmt.Sprintf("%s.tar.zst", name), nil
+	return name + ".tar.zst", nil
 }
 
 // supportsFiltering checks if the package supports filtering.
diff --git a/src/pkg/archive/archive.go b/src/pkg/archive/archive.go
index 6aa0b1a1ad..c1cb5d49d0 100644
--- a/src/pkg/archive/archive.go
+++ b/src/pkg/archive/archive.go
@@ -13,45 +13,318 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/mholt/archiver/v3"
 	"github.com/mholt/archives"
 	"github.com/zarf-dev/zarf/src/config/lang"
-	"github.com/zarf-dev/zarf/src/pkg/layout"
 )
 
-const rwxPerm = 0o755
+const (
+	extensionTar  = ".tar"
+	extensionZip  = ".zip"
+	extensionGz   = ".tar.gz"
+	extensionTgz  = ".tgz"
+	extensionBz2  = ".tar.bz2"
+	extensionTbz2 = ".tbz2"
+	extensionTbz  = ".tbz"
+	extensionXz   = ".tar.xz"
+	extensionTxz  = ".txz"
+	extensionZst  = ".tar.zst"
+	extensionTzst = ".tzst"
+	extensionBr   = ".tar.br"
+	extensionTbr  = ".tbr"
+	extensionLz4  = ".tar.lz4"
+	extensionTlz4 = ".tlz4"
+	extensionLzip = ".tar.lz"
+	extensionMz   = ".tar.mz"
+	extensionTmz  = ".tmz"
+	sbomFileName  = "sbom.tar"
+
+	dirPerm  = 0o755
+	filePerm = 0o644
+)
 
 // CompressOpts is a placeholder for future optional Compress params
 type CompressOpts struct{}
 
-// Compress takes any number of source files and archives them into a tarball at dest path.
-// TODO(mkcp): Migrate to mholt/archives, see CVE-2024-0406
-func Compress(_ context.Context, sources []string, dest string, _ CompressOpts) error {
-	return archiver.Archive(sources, dest)
+// Compress takes any number of source files and archives them into a compressed archive at dest path.
+func Compress(ctx context.Context, sources []string, dest string, _ CompressOpts) (err error) {
+	out, err := os.Create(dest)
+	if err != nil {
+		return fmt.Errorf("failed to create %s: %w", dest, err)
+	}
+	defer func() {
+		err = errors.Join(err, out.Close())
+	}()
+
+	mapping := make(map[string]string, len(sources))
+	for _, src := range sources {
+		mapping[src] = filepath.Base(src)
+	}
+	files, err := archives.FilesFromDisk(ctx, nil, mapping)
+	if err != nil {
+		return fmt.Errorf("failed to stat sources: %w", err)
+	}
+
+	archivers := map[string]archives.Archiver{
+		extensionZip:  archives.Zip{},
+		extensionTar:  archives.Tar{},
+		extensionGz:   archives.CompressedArchive{Compression: archives.Gz{}, Archival: archives.Tar{}},
+		extensionTgz:  archives.CompressedArchive{Compression: archives.Gz{}, Archival: archives.Tar{}},
+		extensionBz2:  archives.CompressedArchive{Compression: archives.Bz2{}, Archival: archives.Tar{}},
+		extensionTbz2: archives.CompressedArchive{Compression: archives.Bz2{}, Archival: archives.Tar{}},
+		extensionTbz:  archives.CompressedArchive{Compression: archives.Bz2{}, Archival: archives.Tar{}},
+		extensionXz:   archives.CompressedArchive{Compression: archives.Xz{}, Archival: archives.Tar{}},
+		extensionTxz:  archives.CompressedArchive{Compression: archives.Xz{}, Archival: archives.Tar{}},
+		extensionZst:  archives.CompressedArchive{Compression: archives.Zstd{}, Archival: archives.Tar{}},
+		extensionTzst: archives.CompressedArchive{Compression: archives.Zstd{}, Archival: archives.Tar{}},
+		extensionBr:   archives.CompressedArchive{Compression: archives.Brotli{}, Archival: archives.Tar{}},
+		extensionTbr:  archives.CompressedArchive{Compression: archives.Brotli{}, Archival: archives.Tar{}},
+		extensionLz4:  archives.CompressedArchive{Compression: archives.Lz4{}, Archival: archives.Tar{}},
+		extensionTlz4: archives.CompressedArchive{Compression: archives.Lz4{}, Archival: archives.Tar{}},
+		extensionLzip: archives.CompressedArchive{Compression: archives.Lzip{}, Archival: archives.Tar{}},
+		extensionMz:   archives.CompressedArchive{Compression: archives.MinLZ{}, Archival: archives.Tar{}},
+		extensionTmz:  archives.CompressedArchive{Compression: archives.MinLZ{}, Archival: archives.Tar{}},
+	}
+
+	// Find the longest matching extension
+	var archiveExt string
+	for ext := range archivers {
+		if strings.HasSuffix(dest, ext) && len(ext) > len(archiveExt) {
+			archiveExt = ext
+		}
+	}
+
+	archiver, ok := archivers[archiveExt]
+	if !ok {
+		return fmt.Errorf("unsupported archive extension for %q", dest)
+	}
+
+	if err := archiver.Archive(ctx, out, files); err != nil {
+		return fmt.Errorf("archive failed for %q: %w", dest, err)
+	}
+
+	return nil
 }
 
 // DecompressOpts provides optional parameters for Decompress
 type DecompressOpts struct {
-	// UnarchiveAll, when enabled, walks the sourceArchive and unarchives everything at the root of the archive.
-	// NOTE(mkcp): This is equivalent to a recursive walk with depth 1.
+	// UnarchiveAll walks root of the archive and unpacks nested .tar files.
 	UnarchiveAll bool
+
+	// Files, if non-empty, means "only extract these exact archive-paths."
+	Files []string
+
+	// StripComponents drops this many leading path elements from every entry.
+	StripComponents int
+
+	// OverwriteExisting, if true, will truncate existing files instead of failing.
+	OverwriteExisting bool
+
+	// SkipValidation, if true, will skip the validation of a file being present in the archive.
+	// This is used with unarchiveFiltered to avoid checking for files that are not in the archive.
+	// This was a previous behavior that the new logic does not support.
+	SkipValidation bool
 }
 
-// Decompress takes Zarf package or arbitrary archive and decompresses it to the path at dest with options.
-func Decompress(ctx context.Context, sourceArchive, dst string, opts DecompressOpts) error {
-	if ctx == nil {
-		ctx = context.Background()
+// Decompress takes a Zarf package or arbitrary archive and decompresses it to dst.
+func Decompress(ctx context.Context, sourceArchive, dst string, opts DecompressOpts) (err error) {
+	if len(opts.Files) > 0 {
+		if err := unarchiveFiltered(ctx, sourceArchive, dst, opts.Files, opts.SkipValidation); err != nil {
+			return fmt.Errorf("unable to decompress selected files: %w", err)
+		}
+		return nil
+	}
+
+	if opts.StripComponents > 0 || opts.OverwriteExisting {
+		err = unarchiveWithStrip(ctx, sourceArchive, dst,
+			opts.StripComponents, opts.OverwriteExisting)
+	} else {
+		err = unarchive(ctx, sourceArchive, dst)
 	}
-	err := unarchive(ctx, sourceArchive, dst)
 	if err != nil {
 		return fmt.Errorf("unable to perform decompression: %w", err)
 	}
+	// 3) nested unarchive step remains unchanged
 	if opts.UnarchiveAll {
-		err = nestedUnarchive(ctx, dst)
-		if err != nil {
+		if err := nestedUnarchive(ctx, dst); err != nil {
+			return err
+		}
+	}
+	return nil
+}
+
+// unarchiveWithStrip unpacks any supported archive, stripping `strip` path elements
+// and opening files with or without truncate based on `overwrite`.
+func unarchiveWithStrip(ctx context.Context, archivePath, dst string, strip int, overwrite bool) (err error) {
+	// open archive
+	f, err := os.Open(archivePath)
+	if err != nil {
+		return fmt.Errorf("opening %q: %w", archivePath, err)
+	}
+	defer func() {
+		err = errors.Join(err, f.Close())
+	}()
+
+	// identify format (tar, tar.zst, zip, etc.)
+	format, input, err := archives.Identify(ctx, filepath.Base(archivePath), f)
+	if err != nil {
+		return fmt.Errorf("identifying archive %q: %w", archivePath, err)
+	}
+	extractor, ok := format.(archives.Extractor)
+	if !ok {
+		return fmt.Errorf("format %T cannot extract", format)
+	}
+
+	// ensure dst exists
+	if err := os.MkdirAll(dst, dirPerm); err != nil {
+		return fmt.Errorf("creating dest %q: %w", dst, err)
+	}
+
+	// choose flags for file creation
+	flags := os.O_CREATE | os.O_WRONLY
+	if overwrite {
+		flags |= os.O_TRUNC
+	} else {
+		flags |= os.O_EXCL
+	}
+
+	handler := func(_ context.Context, fi archives.FileInfo) error {
+		parts := strings.Split(fi.NameInArchive, "/")
+		if len(parts) <= strip {
+			// nothing left after stripping → skip
+			return nil
+		}
+		rel := filepath.Join(parts[strip:]...)
+		target := filepath.Join(dst, rel)
+
+		switch {
+		case fi.IsDir():
+			return os.MkdirAll(target, fi.Mode())
+
+		case fi.LinkTarget != "":
+			// recreate symlink (we do not strip link targets here)
+			return os.Symlink(fi.LinkTarget, target)
+
+		default:
+			// regular file
+			if err := os.MkdirAll(filepath.Dir(target), dirPerm); err != nil {
+				return err
+			}
+			out, err := os.OpenFile(target, flags, fi.Mode())
+			if err != nil {
+				return err
+			}
+			defer func() {
+				err = errors.Join(err, out.Close())
+			}()
+
+			in, err := fi.Open()
+			if err != nil {
+				return err
+			}
+			defer func() {
+				err = errors.Join(err, in.Close())
+			}()
+
+			if _, err := io.Copy(out, in); err != nil {
+				return err
+			}
+			return nil
+		}
+	}
+
+	if err := extractor.Extract(ctx, input, handler); err != nil {
+		return fmt.Errorf("extracting %q: %w", archivePath, err)
+	}
+	return nil
+}
+
+// unarchiveFiltered extracts only the given list of archive‐internal filenames
+// into dst, and errors if any one of them was not found.
+func unarchiveFiltered(ctx context.Context, src, dst string, want []string, skipValidation bool) (err error) {
+	file, err := os.Open(src)
+	if err != nil {
+		return fmt.Errorf("unable to open archive %q: %w", src, err)
+	}
+	defer func() {
+		cErr := file.Close()
+		err = errors.Join(err, cErr)
+	}()
+
+	format, input, err := archives.Identify(ctx, src, file)
+	if err != nil {
+		return fmt.Errorf("unable to identify archive %q: %w", src, err)
+	}
+
+	extractor, ok := format.(archives.Extractor)
+	if !ok {
+		return fmt.Errorf("unsupported format for extraction: %T", format)
+	}
+
+	// We'll track which ones we actually saw
+	found := make(map[string]bool, len(want))
+	wantSet := make(map[string]bool, len(want))
+	for _, name := range want {
+		wantSet[name] = true
+	}
+
+	// Ensure dst exists
+	if err := os.MkdirAll(dst, dirPerm); err != nil {
+		return fmt.Errorf("unable to create destination %q: %w", dst, err)
+	}
+
+	handler := func(_ context.Context, f archives.FileInfo) error {
+		// skip anything not in our list
+		if !wantSet[f.NameInArchive] {
+			return nil
+		}
+		found[f.NameInArchive] = true
+
+		target := filepath.Join(dst, f.NameInArchive)
+
+		switch {
+		case f.IsDir():
+			return os.MkdirAll(target, f.Mode())
+
+		case f.LinkTarget != "":
+			linkDest := filepath.Join(dst, f.LinkTarget)
+			return os.Symlink(linkDest, target)
+
+		default:
+			if err := os.MkdirAll(filepath.Dir(target), dirPerm); err != nil {
+				return err
+			}
+			out, err := os.OpenFile(target, os.O_CREATE|os.O_WRONLY, f.Mode())
+			if err != nil {
+				return err
+			}
+			defer func() {
+				cErr := out.Close()
+				err = errors.Join(err, cErr)
+			}()
+
+			in, err := f.Open()
+			if err != nil {
+				return err
+			}
+			defer func() {
+				err = errors.Join(err, in.Close())
+			}()
+
+			_, err = io.Copy(out, in)
 			return err
 		}
 	}
+
+	if err := extractor.Extract(ctx, input, handler); err != nil {
+		return fmt.Errorf("error extracting filtered entries from %q: %w", src, err)
+	}
+
+	// verify we got them all
+	for _, name := range want {
+		if !found[name] && !skipValidation {
+			return fmt.Errorf("file %q not found in archive %q", name, src)
+		}
+	}
 	return nil
 }
 
@@ -61,11 +334,11 @@ func nestedUnarchive(ctx context.Context, dst string) error {
 		if err != nil {
 			return err
 		}
-		if strings.HasSuffix(path, ".tar") {
-			dst := filepath.Join(strings.TrimSuffix(path, ".tar"), "..")
+		if strings.HasSuffix(path, extensionTar) {
+			dst := filepath.Join(strings.TrimSuffix(path, extensionTar), "..")
 			// Unpack sboms.tar differently since it has a different folder structure than components
-			if info.Name() == layout.SBOMTar {
-				dst = strings.TrimSuffix(path, ".tar")
+			if info.Name() == sbomFileName {
+				dst = strings.TrimSuffix(path, extensionTar)
 			}
 			err := unarchive(ctx, path, dst)
 			if err != nil {
@@ -85,7 +358,7 @@ func nestedUnarchive(ctx context.Context, dst string) error {
 }
 
 // unarchive opens src, identifies its format, and extracts into dst.
-func unarchive(ctx context.Context, src, dst string) error {
+func unarchive(ctx context.Context, src, dst string) (err error) {
 	// Open the archive file
 	file, err := os.Open(src)
 	if err != nil {
@@ -108,7 +381,7 @@ func unarchive(ctx context.Context, src, dst string) error {
 	}
 
 	// Ensure dst exists
-	if err := os.MkdirAll(dst, rwxPerm); err != nil {
+	if err := os.MkdirAll(dst, dirPerm); err != nil {
 		return fmt.Errorf("unable to create destination %q: %w", dst, err)
 	}
 
@@ -128,7 +401,7 @@ func unarchive(ctx context.Context, src, dst string) error {
 
 		default:
 			// regular file
-			if err := os.MkdirAll(filepath.Dir(target), rwxPerm); err != nil {
+			if err := os.MkdirAll(filepath.Dir(target), dirPerm); err != nil {
 				return err
 			}
 			out, err := os.OpenFile(target, os.O_CREATE|os.O_WRONLY, f.Mode())
diff --git a/src/pkg/cluster/injector.go b/src/pkg/cluster/injector.go
index 6a9e6d6bc5..e97cc97dfa 100644
--- a/src/pkg/cluster/injector.go
+++ b/src/pkg/cluster/injector.go
@@ -14,7 +14,6 @@ import (
 	"time"
 
 	"github.com/google/go-containerregistry/pkg/crane"
-	"github.com/mholt/archiver/v3"
 	corev1 "k8s.io/api/core/v1"
 	kerrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/api/resource"
@@ -27,6 +26,7 @@ import (
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
 	"github.com/zarf-dev/zarf/src/internal/healthchecks"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/state"
 	"github.com/zarf-dev/zarf/src/pkg/transform"
@@ -216,10 +216,11 @@ func (c *Cluster) createPayloadConfigMaps(ctx context.Context, tmpDir, imagesDir
 	if err != nil {
 		return nil, "", err
 	}
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	if err := archiver.Archive(tarFileList, tarPath); err != nil {
-		return nil, "", err
+
+	if err := archive.Compress(ctx, tarFileList, tarPath, archive.CompressOpts{}); err != nil {
+		return nil, "", fmt.Errorf("failed to compress the payload: %w", err)
 	}
+
 	payloadChunkSize := 1024 * 768
 	chunks, shasum, err := helpers.ReadFileByChunks(tarPath, payloadChunkSize)
 	if err != nil {
diff --git a/src/pkg/layout/component.go b/src/pkg/layout/component.go
index 8461d790f4..dafc95c45d 100644
--- a/src/pkg/layout/component.go
+++ b/src/pkg/layout/component.go
@@ -12,8 +12,8 @@ import (
 	"path/filepath"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
-	"github.com/mholt/archiver/v3"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 )
 
@@ -136,10 +136,8 @@ func (c *Components) Unarchive(ctx context.Context, component v1alpha1.ZarfCompo
 		return nil
 	}
 
-	// TODO(mkcp): Bring in context and port to logger
 	l.Debug("unarchiving", "component", filepath.Base(tb))
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	if err := archiver.Unarchive(tb, c.Base); err != nil {
+	if err := archive.Decompress(ctx, tb, c.Base, archive.DecompressOpts{}); err != nil {
 		return err
 	}
 	return os.Remove(tb)
diff --git a/src/pkg/layout/package.go b/src/pkg/layout/package.go
index 1d07b45a25..19211dd769 100644
--- a/src/pkg/layout/package.go
+++ b/src/pkg/layout/package.go
@@ -16,9 +16,9 @@ import (
 	"github.com/Masterminds/semver/v3"
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	"github.com/google/go-containerregistry/pkg/crane"
-	"github.com/mholt/archiver/v3"
 	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/interactive"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/packager/deprecated"
@@ -233,8 +233,8 @@ func (pp *PackagePaths) ArchivePackage(ctx context.Context, destinationTarball s
 
 	// Make the archive
 	archiveSrc := []string{pp.Base + string(os.PathSeparator)}
-	if err := archiver.Archive(archiveSrc, destinationTarball); err != nil {
-		return fmt.Errorf("unable to create package: %w", err)
+	if err := archive.Compress(ctx, archiveSrc, destinationTarball, archive.CompressOpts{}); err != nil {
+		return fmt.Errorf("unable to compress package: %w", err)
 	}
 	l.Debug("ArchivePackage wrote", "base", pp.Base, "destination", destinationTarball)
 
diff --git a/src/pkg/layout/sbom.go b/src/pkg/layout/sbom.go
index fcfb300be6..3d1443c695 100644
--- a/src/pkg/layout/sbom.go
+++ b/src/pkg/layout/sbom.go
@@ -5,13 +5,14 @@
 package layout
 
 import (
+	"context"
 	"fmt"
 	"io/fs"
 	"os"
 	"path/filepath"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
-	"github.com/mholt/archiver/v3"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 )
 
 // ComponentSBOM contains paths for a component's SBOM.
@@ -39,7 +40,7 @@ func (s *SBOMs) Unarchive() error {
 	}
 	tb := s.Path
 	dir := filepath.Join(filepath.Dir(tb), SBOMDir)
-	if err := archiver.Unarchive(tb, dir); err != nil {
+	if err := archive.Decompress(context.Background(), tb, dir, archive.DecompressOpts{}); err != nil {
 		return err
 	}
 	s.Path = dir
diff --git a/src/pkg/packager/composer/oci.go b/src/pkg/packager/composer/oci.go
index adae393957..d2cfbe2697 100644
--- a/src/pkg/packager/composer/oci.go
+++ b/src/pkg/packager/composer/oci.go
@@ -13,9 +13,9 @@ import (
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	"github.com/defenseunicorns/pkg/oci"
-	"github.com/mholt/archiver/v3"
 	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
 	"github.com/zarf-dev/zarf/src/config"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/zoci"
@@ -127,11 +127,9 @@ func (ic *ImportChain) fetchOCISkeleton(ctx context.Context) error {
 		return nil
 	}
 
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	tu := archiver.Tar{
+	decompressOpts := archive.DecompressOpts{
 		OverwriteExisting: true,
-		// removes /<component-name>/ from the paths
-		StripComponents: 1,
+		StripComponents:   1,
 	}
-	return tu.Unarchive(tb, dir)
+	return archive.Decompress(ctx, tb, dir, decompressOpts)
 }
diff --git a/src/pkg/packager/creator/normal.go b/src/pkg/packager/creator/normal.go
index e63607a996..4c1651cba8 100644
--- a/src/pkg/packager/creator/normal.go
+++ b/src/pkg/packager/creator/normal.go
@@ -17,7 +17,6 @@ import (
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	"github.com/defenseunicorns/pkg/oci"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/mholt/archiver/v3"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
 	"github.com/zarf-dev/zarf/src/config/lang"
@@ -26,6 +25,7 @@ import (
 	"github.com/zarf-dev/zarf/src/internal/packager/images"
 	"github.com/zarf-dev/zarf/src/internal/packager/kustomize"
 	"github.com/zarf-dev/zarf/src/internal/packager/sbom"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/packager/actions"
@@ -401,9 +401,10 @@ func (pc *PackageCreator) addComponent(ctx context.Context, component v1alpha1.Z
 					return fmt.Errorf(lang.ErrDownloading, file.Source, err.Error())
 				}
 
-				// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-				err = archiver.Extract(compressedFile, file.ExtractPath, destinationDir)
-				if err != nil {
+				decompressOpts := archive.DecompressOpts{
+					Files: []string{file.ExtractPath},
+				}
+				if err := archive.Decompress(ctx, compressedFile, destinationDir, decompressOpts); err != nil {
 					return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, compressedFileName, err.Error())
 				}
 			} else {
@@ -413,8 +414,10 @@ func (pc *PackageCreator) addComponent(ctx context.Context, component v1alpha1.Z
 			}
 		} else {
 			if file.ExtractPath != "" {
-				// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-				if err := archiver.Extract(file.Source, file.ExtractPath, destinationDir); err != nil {
+				decompressOpts := archive.DecompressOpts{
+					Files: []string{file.ExtractPath},
+				}
+				if err := archive.Decompress(ctx, file.Source, destinationDir, decompressOpts); err != nil {
 					return fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, file.Source, err.Error())
 				}
 			} else {
diff --git a/src/pkg/packager/creator/skeleton.go b/src/pkg/packager/creator/skeleton.go
index 09b224990b..32fac150aa 100644
--- a/src/pkg/packager/creator/skeleton.go
+++ b/src/pkg/packager/creator/skeleton.go
@@ -12,12 +12,12 @@ import (
 	"strconv"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
-	"github.com/mholt/archiver/v3"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
 	"github.com/zarf-dev/zarf/src/config/lang"
 	"github.com/zarf-dev/zarf/src/internal/packager/helm"
 	"github.com/zarf-dev/zarf/src/internal/packager/kustomize"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/utils"
@@ -193,8 +193,10 @@ func (sc *SkeletonCreator) addComponent(ctx context.Context, component v1alpha1.
 		destinationDir := filepath.Dir(dst)
 
 		if file.ExtractPath != "" {
-			// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-			if err := archiver.Extract(file.Source, file.ExtractPath, destinationDir); err != nil {
+			decompressOpts := archive.DecompressOpts{
+				Files: []string{file.ExtractPath},
+			}
+			if err := archive.Decompress(ctx, file.Source, destinationDir, decompressOpts); err != nil {
 				return nil, fmt.Errorf(lang.ErrFileExtract, file.ExtractPath, file.Source, err.Error())
 			}
 
diff --git a/src/pkg/packager/sources/oci.go b/src/pkg/packager/sources/oci.go
index 6b2516e7ee..1e9cf9487e 100644
--- a/src/pkg/packager/sources/oci.go
+++ b/src/pkg/packager/sources/oci.go
@@ -12,9 +12,9 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/mholt/archiver/v3"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/packager/filters"
@@ -196,6 +196,5 @@ func (s *OCISource) Collect(ctx context.Context, dir string) (string, error) {
 
 	_ = os.Remove(dstTarball)
 
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	return dstTarball, archiver.Archive(allTheLayers, dstTarball)
+	return dstTarball, archive.Compress(ctx, allTheLayers, dstTarball, archive.CompressOpts{})
 }
diff --git a/src/pkg/packager/sources/tarball.go b/src/pkg/packager/sources/tarball.go
index 183b266daa..370f3a923e 100644
--- a/src/pkg/packager/sources/tarball.go
+++ b/src/pkg/packager/sources/tarball.go
@@ -5,18 +5,19 @@
 package sources
 
 import (
-	"archive/tar"
 	"context"
 	"errors"
 	"fmt"
 	"io"
+	"io/fs"
 	"os"
 	"path/filepath"
 	"time"
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
-	"github.com/mholt/archiver/v3"
+	"github.com/mholt/archives"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/logger"
 	"github.com/zarf-dev/zarf/src/pkg/packager/filters"
@@ -47,38 +48,43 @@ func (s *TarballSource) LoadPackage(ctx context.Context, dst *layout.PackagePath
 	}
 
 	pathsExtracted := []string{}
+	// 1) Mount the archive as a virtual file system.
+	fsys, err := archives.FileSystem(ctx, s.PackageSource, nil)
+	if err != nil {
+		return pkg, nil, fmt.Errorf("unable to open archive %q: %w", s.PackageSource, err)
+	}
 
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Walk(s.PackageSource, func(f archiver.File) error {
-		if f.IsDir() {
-			return nil
-		}
-		header, ok := f.Header.(*tar.Header)
-		if !ok {
-			return fmt.Errorf("expected header to be *tar.Header but was %T", f.Header)
+	// 2) Walk every entry in the archive.
+	err = fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error {
+		if err != nil {
+			return err
 		}
-		path := header.Name
-
-		dir := filepath.Dir(path)
-		if dir != "." {
-			if err := os.MkdirAll(filepath.Join(dst.Base, dir), helpers.ReadExecuteAllWriteUser); err != nil {
-				return err
-			}
+		// skip directories
+		if d.IsDir() {
+			return nil
 		}
-
+		// ensure parent dirs exist in our temp dir
 		dstPath := filepath.Join(dst.Base, path)
 		pathsExtracted = append(pathsExtracted, path)
-		dst, err := os.Create(dstPath)
+		if err := os.MkdirAll(filepath.Dir(dstPath), helpers.ReadExecuteAllWriteUser); err != nil {
+			return err
+		}
+		// copy file contents
+		in, err := fsys.Open(path)
 		if err != nil {
 			return err
 		}
-		defer dst.Close()
+		defer in.Close()
 
-		_, err = io.Copy(dst, f)
+		out, err := os.Create(dstPath)
 		if err != nil {
 			return err
 		}
+		defer out.Close()
 
+		if _, err := io.Copy(out, in); err != nil {
+			return err
+		}
 		return nil
 	})
 	if err != nil {
@@ -156,17 +162,20 @@ func (s *TarballSource) LoadPackageMetadata(ctx context.Context, dst *layout.Pac
 	}
 	pathsExtracted := []string{}
 
+	decompressOpts := archive.DecompressOpts{
+		Files:          toExtract,
+		SkipValidation: true, // retain the original behavior of not validating the existence of the files
+	}
+	err = archive.Decompress(ctx, s.PackageSource, dst.Base, decompressOpts)
+	if err != nil {
+		return pkg, nil, fmt.Errorf("unable to extract archive %q: %w", s.PackageSource, err)
+	}
+
 	for _, rel := range toExtract {
-		// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-		if err := archiver.Extract(s.PackageSource, rel, dst.Base); err != nil {
-			return pkg, nil, err
-		}
-		// archiver.Extract will not return an error if the file does not exist, so we must manually check
 		if !helpers.InvalidPath(filepath.Join(dst.Base, rel)) {
 			pathsExtracted = append(pathsExtracted, rel)
 		}
 	}
-
 	dst.SetFromPaths(ctx, pathsExtracted)
 
 	pkg, warnings, err = dst.ReadZarfYAML()
diff --git a/src/pkg/packager/sources/utils.go b/src/pkg/packager/sources/utils.go
index 428fa5d977..7a5bd2033f 100644
--- a/src/pkg/packager/sources/utils.go
+++ b/src/pkg/packager/sources/utils.go
@@ -5,6 +5,7 @@
 package sources
 
 import (
+	"context"
 	"fmt"
 	"io"
 	"os"
@@ -13,7 +14,7 @@ import (
 
 	"github.com/defenseunicorns/pkg/helpers/v2"
 	goyaml "github.com/goccy/go-yaml"
-	"github.com/mholt/archiver/v3"
+	"github.com/mholt/archives"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
@@ -36,46 +37,69 @@ func IsValidFileExtension(filename string) bool {
 	return false
 }
 
+// identifyUnknownTarball tries "path" as-is first, then retries
+// with .tar.zst, .tar.gz, .tar.xz, and .tar appended,
+// using archives.Identify to detect only tar variants.
 func identifyUnknownTarball(path string) (string, error) {
+	// 1) missing file?
 	if helpers.InvalidPath(path) {
 		return "", &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist}
 	}
-	if filepath.Ext(path) != "" && IsValidFileExtension(path) {
-		return path, nil
-	} else if filepath.Ext(path) != "" && !IsValidFileExtension(path) {
-		return "", fmt.Errorf("%s is not a supported tarball format (%+v)", path, GetValidPackageExtensions())
-	}
+	ctx := context.Background()
 
-	// rename to .tar.zst and check if it's a valid tar.zst
-	tzst := fmt.Sprintf("%s.tar.zst", path)
-	if err := os.Rename(path, tzst); err != nil {
-		return "", err
-	}
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	format, err := archiver.ByExtension(tzst)
-	if err != nil {
-		return "", err
-	}
-	_, ok := format.(*archiver.TarZstd)
-	if ok {
-		return tzst, nil
-	}
+	// helper to test a candidate filename
+	try := func(name string) (bool, error) {
+		f, err := os.Open(name)
+		if err != nil {
+			return false, err
+		}
+		defer f.Close()
 
-	// rename to .tar and check if it's a valid tar
-	tb := fmt.Sprintf("%s.tar", path)
-	if err := os.Rename(tzst, tb); err != nil {
-		return "", err
+		// Identify by filename or header
+		format, _, err := archives.Identify(ctx, filepath.Base(name), f)
+		if err != nil {
+			// NoMatch or other error
+			return false, nil
+		}
+
+		// "format" might be a plain Tar, or a CompressedArchive wrapping Tar
+		switch v := format.(type) {
+		case archives.Tar:
+			return true, nil
+		case archives.CompressedArchive:
+			if _, ok := v.Archival.(archives.Tar); ok {
+				return true, nil
+			}
+		}
+		return false, nil
 	}
-	format, err = archiver.ByExtension(tb)
-	if err != nil {
+
+	// 2) try original path
+	if _, err := try(path); err != nil {
 		return "", err
 	}
-	_, ok = format.(*archiver.Tar)
-	if ok {
-		return tb, nil
+
+	// 3) try each extension in order
+	for _, ext := range []string{".tar.zst", ".tar.gz", ".tar.xz", ".tar"} {
+		newPath := path + ext
+		if err := os.Rename(path, newPath); err != nil {
+			continue // maybe file locked or already renamed
+		}
+
+		if ok, err := try(newPath); err != nil {
+			// rename back before bailing
+			_ = os.Rename(newPath, path)
+			return "", err
+		} else if ok {
+			return newPath, nil
+		}
+
+		// not a tar variant—roll back rename
+		_ = os.Rename(newPath, path)
 	}
 
-	return "", fmt.Errorf("%s is not a supported tarball format (%+v)", path, GetValidPackageExtensions())
+	return "", fmt.Errorf("%s is not a supported tarball format (%v)",
+		path, GetValidPackageExtensions())
 }
 
 // RenameFromMetadata renames a tarball based on its metadata.
@@ -95,19 +119,23 @@ func RenameFromMetadata(path string) (string, error) {
 		ext = ".tar.zst"
 	}
 
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	if err := archiver.Walk(path, func(f archiver.File) error {
-		if f.Name() == layout.ZarfYAML {
-			b, err := io.ReadAll(f)
-			if err != nil {
-				return err
-			}
-			if err := goyaml.Unmarshal(b, &pkg); err != nil {
-				return err
-			}
-		}
-		return nil
-	}); err != nil {
+	fsys, err := archives.FileSystem(context.Background(), path, nil)
+	if err != nil {
+		return "", fmt.Errorf("unable to open archive %q: %w", path, err)
+	}
+
+	// 3) open just the zarf.yaml entry
+	f, err := fsys.Open(layout.ZarfYAML)
+	if err != nil {
+		return "", fmt.Errorf("%s does not contain a %s", path, layout.ZarfYAML)
+	}
+
+	// 4) read & unmarshal into our package struct
+	data, err := io.ReadAll(f)
+	if err != nil {
+		return "", err
+	}
+	if err := goyaml.Unmarshal(data, &pkg); err != nil {
 		return "", err
 	}
 
@@ -121,6 +149,12 @@ func RenameFromMetadata(path string) (string, error) {
 
 	tb := filepath.Join(filepath.Dir(path), name)
 
+	// Windows will not allow the rename if open
+	err = f.Close()
+	if err != nil {
+		return "", err
+	}
+
 	return tb, os.Rename(path, tb)
 }
 


Test patch:
diff --git a/src/internal/packager2/layout/create_test.go b/src/internal/packager2/layout/create_test.go
index e0e859c8d5..e8d17088c8 100644
--- a/src/internal/packager2/layout/create_test.go
+++ b/src/internal/packager2/layout/create_test.go
@@ -331,6 +331,8 @@ func TestGetSBOM(t *testing.T) {
 	t.Parallel()
 	lint.ZarfSchema = testutil.LoadSchema(t, "../../../../zarf.schema.json")
 
+	ctx := testutil.TestContext(t)
+
 	tmpdir := t.TempDir()
 	pkg := v1alpha1.ZarfPackage{
 		Kind: v1alpha1.ZarfPackageConfig,
@@ -345,13 +347,13 @@ func TestGetSBOM(t *testing.T) {
 	}
 	writePackageToDisk(t, pkg, tmpdir)
 
-	pkgLayout, err := CreatePackage(context.Background(), tmpdir, CreateOptions{})
+	pkgLayout, err := CreatePackage(ctx, tmpdir, CreateOptions{})
 	require.NoError(t, err)
 
 	// Ensure the SBOM does not exist
 	require.NoFileExists(t, filepath.Join(pkgLayout.dirPath, SBOMTar))
 	// Ensure Zarf errors correctly
-	_, err = pkgLayout.GetSBOM(tmpdir)
+	_, err = pkgLayout.GetSBOM(ctx, tmpdir)
 	var noSBOMErr *NoSBOMAvailableError
 	require.ErrorAs(t, err, &noSBOMErr)
 }
@@ -359,6 +361,7 @@ func TestGetSBOM(t *testing.T) {
 func TestCreateAbsolutePathFileSource(t *testing.T) {
 	t.Parallel()
 	lint.ZarfSchema = testutil.LoadSchema(t, "../../../../zarf.schema.json")
+	ctx := testutil.TestContext(t)
 
 	createFileToImport := func(t *testing.T, dir string) string {
 		t.Helper()
@@ -393,11 +396,11 @@ func TestCreateAbsolutePathFileSource(t *testing.T) {
 		// Create the zarf.yaml file in the tmpdir
 		writePackageToDisk(t, pkg, tmpdir)
 
-		pkgLayout, err := CreatePackage(context.Background(), tmpdir, CreateOptions{})
+		pkgLayout, err := CreatePackage(ctx, tmpdir, CreateOptions{})
 		require.NoError(t, err)
 
 		// Ensure the components have the correct file
-		fileComponent, err := pkgLayout.GetComponentDir(tmpdir, "file", FilesComponentDir)
+		fileComponent, err := pkgLayout.GetComponentDir(ctx, tmpdir, "file", FilesComponentDir)
 		require.NoError(t, err)
 		require.FileExists(t, filepath.Join(fileComponent, "0", "file.txt"))
 	})
@@ -449,7 +452,7 @@ func TestCreateAbsolutePathFileSource(t *testing.T) {
 		require.NoError(t, err)
 
 		// Ensure the component has the correct file
-		importedFileComponent, err := pkgLayout.GetComponentDir(tmpdir, "file-import", FilesComponentDir)
+		importedFileComponent, err := pkgLayout.GetComponentDir(ctx, tmpdir, "file-import", FilesComponentDir)
 		require.NoError(t, err)
 		require.FileExists(t, filepath.Join(importedFileComponent, "0", "file.txt"))
 	})
diff --git a/src/internal/packager2/layout/package_test.go b/src/internal/packager2/layout/package_test.go
index 584c8092c1..37f0f7b26c 100644
--- a/src/internal/packager2/layout/package_test.go
+++ b/src/internal/packager2/layout/package_test.go
@@ -25,7 +25,7 @@ func TestPackageLayout(t *testing.T) {
 	require.Equal(t, "0.0.1", pkgLayout.Pkg.Metadata.Version)
 
 	tmpDir := t.TempDir()
-	manifestDir, err := pkgLayout.GetComponentDir(tmpDir, "test", ManifestsComponentDir)
+	manifestDir, err := pkgLayout.GetComponentDir(ctx, tmpDir, "test", ManifestsComponentDir)
 	require.NoError(t, err)
 	expected, err := os.ReadFile("../testdata/deployment.yaml")
 	require.NoError(t, err)
@@ -33,14 +33,14 @@ func TestPackageLayout(t *testing.T) {
 	require.NoError(t, err)
 	require.Equal(t, expected, b)
 
-	_, err = pkgLayout.GetComponentDir(t.TempDir(), "does-not-exist", ManifestsComponentDir)
+	_, err = pkgLayout.GetComponentDir(ctx, t.TempDir(), "does-not-exist", ManifestsComponentDir)
 	require.ErrorContains(t, err, "component does-not-exist does not exist in package")
 
-	_, err = pkgLayout.GetComponentDir(t.TempDir(), "test", FilesComponentDir)
+	_, err = pkgLayout.GetComponentDir(ctx, t.TempDir(), "test", FilesComponentDir)
 	require.ErrorContains(t, err, "component test could not access a files directory")
 
 	tmpDir = t.TempDir()
-	sbomPath, err := pkgLayout.GetSBOM(tmpDir)
+	sbomPath, err := pkgLayout.GetSBOM(ctx, tmpDir)
 	require.NoError(t, err)
 	require.FileExists(t, filepath.Join(sbomPath, "compare.html"))
 
diff --git a/src/pkg/archive/archive_test.go b/src/pkg/archive/archive_test.go
index c8fbe637d4..0b7e49b19e 100644
--- a/src/pkg/archive/archive_test.go
+++ b/src/pkg/archive/archive_test.go
@@ -5,48 +5,240 @@
 package archive
 
 import (
+	"context"
+	"os"
+	"path/filepath"
+	"strings"
 	"testing"
 
-	"github.com/open-policy-agent/opa/util/test"
+	"github.com/stretchr/testify/require"
 )
 
-// TODO(mkcp): Unit test Compress
-func TestCompress(t *testing.T) {
-	test.Skip(t)
-	tt := []struct {
-		name string
-		opts CompressOpts
+const (
+	testDirPerm  = dirPerm
+	testFilePerm = filePerm
+)
+
+// writeFile creates a file at path with given content.
+func writeFile(t *testing.T, path, content string) {
+	t.Helper()
+	if err := os.WriteFile(path, []byte(content), testFilePerm); err != nil {
+		t.Fatalf("failed to write file %s: %v", path, err)
+	}
+}
+
+// readFile returns the content of the file at path.
+func readFile(t *testing.T, path string) string {
+	t.Helper()
+	data, err := os.ReadFile(path)
+	if err != nil {
+		t.Fatalf("failed to read file %s: %v", path, err)
+	}
+	return string(data)
+}
+
+func TestCompressAndDecompress_MultipleFormats(t *testing.T) {
+	t.Parallel()
+	ctx := context.Background()
+
+	formats := []struct {
+		name      string
+		extension string
+	}{
+		{"tar", extensionTar},
+		{"zip", extensionZip},
+		{"tar.gz", extensionGz},
+		{"tgz", extensionTgz},
+		{"tar.bz2", extensionBz2},
+		{"tbz2", extensionTbz2},
+		{"tbz", extensionTbz},
+		{"tar.xz", extensionXz},
+		{"txz", extensionTxz},
+		{"tar.zst", extensionZst},
+		{"tzst", extensionTzst},
+		{"tar.br", extensionBr},
+		{"tbr", extensionTbr},
+		{"tar.lz4", extensionLz4},
+		{"tlz4", extensionTlz4},
+		{"tar.lz", extensionLzip},
+		{"tar.mz", extensionMz},
+		{"tmz", extensionTmz},
+	}
+
+	for _, tc := range formats {
+		t.Run(tc.name, func(t *testing.T) {
+			t.Parallel()
+			srcDir := t.TempDir()
+			f1 := filepath.Join(srcDir, "file1.txt")
+			f2 := filepath.Join(srcDir, "file2.txt")
+			writeFile(t, f1, "hello world")
+			writeFile(t, f2, "zarf testing")
+
+			dest := filepath.Join(t.TempDir(), "archive"+tc.extension)
+			require.NoError(t, Compress(ctx, []string{f1, f2}, dest, CompressOpts{}), "Compress failed for %s", tc.name)
+
+			dstDir := t.TempDir()
+			require.NoError(t, Decompress(ctx, dest, dstDir, DecompressOpts{}), "Decompress failed for %s", tc.name)
+
+			got1 := readFile(t, filepath.Join(dstDir, "file1.txt"))
+			require.Equal(t, "hello world", got1, "[%s] file1 content", tc.name)
+			got2 := readFile(t, filepath.Join(dstDir, "file2.txt"))
+			require.Equal(t, "zarf testing", got2, "[%s] file2 content", tc.name)
+		})
+	}
+}
+
+func TestCompressUnsupportedExtension(t *testing.T) {
+	t.Parallel()
+	ctx := context.Background()
+	src := filepath.Join(t.TempDir(), "f.txt")
+	writeFile(t, src, "data")
+	dest := filepath.Join(t.TempDir(), "archive.foo")
+	err := Compress(ctx, []string{src}, dest, CompressOpts{})
+	if err == nil || !strings.Contains(err.Error(), "unsupported archive extension") {
+		t.Errorf("expected unsupported extension error; got %v", err)
+	}
+}
+
+func TestDecompressFiltered(t *testing.T) {
+	t.Parallel()
+	ctx := context.Background()
+
+	tests := []struct {
+		name        string
+		setup       func(t *testing.T, ctx context.Context) (archivePath, outDir string, opts DecompressOpts)
+		expectError string
+		verify      func(t *testing.T, outDir string)
 	}{
 		{
-			name: "CompressOpts can be empty",
-			opts: CompressOpts{},
+			name: "Filtered_NotFound",
+			setup: func(t *testing.T, ctx context.Context) (string, string, DecompressOpts) {
+				srcDir := t.TempDir()
+				file := filepath.Join(srcDir, "only.txt")
+				writeFile(t, file, "uniquely present")
+				destZip := filepath.Join(t.TempDir(), "only.zip")
+				require.NoError(t, Compress(ctx, []string{file}, destZip, CompressOpts{}), "Compress failed")
+				dstDir := t.TempDir()
+				opts := DecompressOpts{Files: []string{"absent.txt"}, SkipValidation: false}
+				return destZip, dstDir, opts
+			},
+			expectError: "absent.txt",
+			verify:      nil,
+		},
+		{
+			name: "Filtered_SkipValidation",
+			setup: func(t *testing.T, ctx context.Context) (string, string, DecompressOpts) {
+				srcDir := t.TempDir()
+				file := filepath.Join(srcDir, "only.txt")
+				writeFile(t, file, "content")
+				destZip := filepath.Join(t.TempDir(), "only.zip")
+				require.NoError(t, Compress(ctx, []string{file}, destZip, CompressOpts{}), "Compress failed")
+				dstDir := t.TempDir()
+				opts := DecompressOpts{Files: []string{"also_missing.txt"}, SkipValidation: true}
+				return destZip, dstDir, opts
+			},
+			expectError: "",
+			verify: func(t *testing.T, outDir string) {
+				entries, err := os.ReadDir(outDir)
+				require.NoError(t, err, "ReadDir failed")
+				require.Empty(t, entries, "expected no files extracted")
+			},
 		},
 	}
 
-	for _, tc := range tt {
+	for _, tc := range tests {
 		t.Run(tc.name, func(t *testing.T) {
-			t.Skip()
+			t.Parallel()
+			archivePath, outDir, opts := tc.setup(t, ctx)
+			err := Decompress(ctx, archivePath, outDir, opts)
+			if tc.expectError != "" {
+				require.Error(t, err)
+				require.Contains(t, err.Error(), tc.expectError)
+			} else {
+				require.NoError(t, err)
+				if tc.verify != nil {
+					tc.verify(t, outDir)
+				}
+			}
 		})
 	}
 }
 
-// TODO(mkcp): Unit test Decompress. Some overlap with e2e/05_tarball_test.go
-func TestDecompress(t *testing.T) {
-	tt := []struct {
-		name string
-		opts DecompressOpts
+func TestDecompressOptions(t *testing.T) {
+	t.Parallel()
+	ctx := context.Background()
+
+	tests := []struct {
+		name   string
+		setup  func(t *testing.T, ctx context.Context) (archivePath, outDir string, opts DecompressOpts)
+		verify func(t *testing.T, outDir string)
 	}{
 		{
-			name: "TODO",
-			opts: DecompressOpts{
-				UnarchiveAll: true,
+			name: "UnarchiveAll",
+			setup: func(t *testing.T, ctx context.Context) (string, string, DecompressOpts) {
+				tmp := t.TempDir()
+				innerDir := filepath.Join(tmp, "inner")
+				require.NoError(t, os.Mkdir(innerDir, testDirPerm))
+				innerFile := filepath.Join(innerDir, "foo.txt")
+				writeFile(t, innerFile, "nested content")
+				innerTar := filepath.Join(tmp, "inner.tar")
+				require.NoError(t, Compress(ctx, []string{innerFile}, innerTar, CompressOpts{}))
+				outerDir := filepath.Join(tmp, "outer")
+				require.NoError(t, os.Mkdir(outerDir, testDirPerm))
+				outerTar := filepath.Join(tmp, "outer.tar")
+				require.NoError(t, os.Rename(innerTar, filepath.Join(outerDir, "inner.tar")))
+				require.NoError(t, Compress(ctx, []string{filepath.Join(outerDir, "inner.tar")}, outerTar, CompressOpts{}))
+				outDir := filepath.Join(tmp, "out")
+				opts := DecompressOpts{UnarchiveAll: true}
+				return outerTar, outDir, opts
+			},
+			verify: func(t *testing.T, outDir string) {
+				found := false
+				err := filepath.Walk(outDir, func(path string, _ os.FileInfo, _ error) error {
+					if filepath.Base(path) == "foo.txt" {
+						found = true
+						content := readFile(t, path)
+						require.Equal(t, "nested content", content)
+					}
+					return nil
+				})
+				require.NoError(t, err, "Walk failed")
+				require.True(t, found, "foo.txt not found after UnarchiveAll")
+			},
+		},
+		{
+			name: "OverwriteExisting",
+			setup: func(t *testing.T, ctx context.Context) (string, string, DecompressOpts) {
+				tmp := t.TempDir()
+				origFile := filepath.Join(tmp, "orig.txt")
+				writeFile(t, origFile, "original")
+				archivePath := filepath.Join(tmp, "archive.tar.gz")
+				require.NoError(t, Compress(ctx, []string{origFile}, archivePath, CompressOpts{}))
+				outDir := filepath.Join(tmp, "out")
+				require.NoError(t, Decompress(ctx, archivePath, outDir, DecompressOpts{}))
+				outFile := filepath.Join(outDir, "orig.txt")
+				require.Equal(t, "original", readFile(t, outFile))
+				writeFile(t, origFile, "new content")
+				archivePath2 := filepath.Join(tmp, "archive2.tar.gz")
+				require.NoError(t, Compress(ctx, []string{origFile}, archivePath2, CompressOpts{}))
+				opts := DecompressOpts{OverwriteExisting: true}
+				return archivePath2, outDir, opts
+			},
+			verify: func(t *testing.T, outDir string) {
+				outFile := filepath.Join(outDir, "orig.txt")
+				require.Equal(t, "new content", readFile(t, outFile))
 			},
 		},
 	}
 
-	for _, tc := range tt {
+	for _, tc := range tests {
 		t.Run(tc.name, func(t *testing.T) {
-			t.Skip()
+			t.Parallel()
+			archivePath, outDir, opts := tc.setup(t, ctx)
+			require.NoError(t, Decompress(ctx, archivePath, outDir, opts))
+			if tc.verify != nil {
+				tc.verify(t, outDir)
+			}
 		})
 	}
 }
diff --git a/src/pkg/packager/sources/new_test.go b/src/pkg/packager/sources/new_test.go
index eb14403778..3bcec81e49 100644
--- a/src/pkg/packager/sources/new_test.go
+++ b/src/pkg/packager/sources/new_test.go
@@ -101,7 +101,7 @@ func TestNewPackageSource(t *testing.T) {
 }
 
 func TestPackageSource(t *testing.T) {
-	t.Parallel()
+	// t.Parallel()
 
 	// Copy tar to a temp directory, otherwise Collect will delete it.
 	tarName := "zarf-package-wordpress-amd64-16.0.4.tar.zst"
diff --git a/src/test/e2e/06_create_sbom_test.go b/src/test/e2e/06_create_sbom_test.go
index 3b8c096923..09d40543ac 100644
--- a/src/test/e2e/06_create_sbom_test.go
+++ b/src/test/e2e/06_create_sbom_test.go
@@ -5,7 +5,6 @@
 package test
 
 import (
-	"context"
 	"fmt"
 	"os"
 	"path/filepath"
@@ -15,10 +14,12 @@ import (
 	"github.com/stretchr/testify/require"
 
 	layout2 "github.com/zarf-dev/zarf/src/internal/packager2/layout"
+	"github.com/zarf-dev/zarf/src/test/testutil"
 )
 
 func TestCreateSBOM(t *testing.T) {
 	t.Parallel()
+	ctx := testutil.TestContext(t)
 
 	outSbomPath := filepath.Join(t.TempDir(), ".sbom-location")
 	buildPath := t.TempDir()
@@ -33,9 +34,9 @@ func TestCreateSBOM(t *testing.T) {
 	_, _, err := e2e.Zarf(t, "package", "create", "examples/dos-games", "-o", buildPath, "--sbom-out", outSbomPath, "--confirm")
 	require.NoError(t, err)
 
-	pkgLayout, err := layout2.LoadFromTar(context.Background(), tarPath, layout2.PackageLayoutOptions{})
+	pkgLayout, err := layout2.LoadFromTar(ctx, tarPath, layout2.PackageLayoutOptions{})
 	require.NoError(t, err)
-	getSbomPath, err := pkgLayout.GetSBOM(t.TempDir())
+	getSbomPath, err := pkgLayout.GetSBOM(ctx, t.TempDir())
 	require.NoError(t, err)
 	for _, expectedFile := range expectedFiles {
 		require.FileExists(t, filepath.Join(getSbomPath, expectedFile))
diff --git a/src/test/e2e/08_create_differential_test.go b/src/test/e2e/08_create_differential_test.go
index 1ac3d72103..3ab7916e40 100644
--- a/src/test/e2e/08_create_differential_test.go
+++ b/src/test/e2e/08_create_differential_test.go
@@ -9,10 +9,10 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/mholt/archiver/v3"
 	"github.com/stretchr/testify/require"
 	"github.com/zarf-dev/zarf/src/api/v1alpha1"
 	"github.com/zarf-dev/zarf/src/config/lang"
+	"github.com/zarf-dev/zarf/src/pkg/archive"
 	"github.com/zarf-dev/zarf/src/pkg/layout"
 	"github.com/zarf-dev/zarf/src/pkg/utils"
 )
@@ -43,8 +43,10 @@ func TestCreateDifferential(t *testing.T) {
 	defer e2e.CleanFiles(t, differentialPackageName)
 
 	// Extract the yaml of the differential package
-	// TODO(mkcp): See https://github.com/zarf-dev/zarf/issues/3051
-	err = archiver.Extract(differentialPackageName, layout.ZarfYAML, tmpdir)
+	decompressOpts := archive.DecompressOpts{
+		Files: []string{layout.ZarfYAML},
+	}
+	err = archive.Decompress(t.Context(), differentialPackageName, tmpdir, decompressOpts)
 	require.NoError(t, err, "unable to extract zarf.yaml from the differential git package")
 
 	// Load the extracted zarf.yaml specification