2017-09-14

pack

compound, compress and encrypt files with tar, xz and scrypt

you want to create packages from files easily and are ok with managing archives in a limited set of formats with filename extensions? then the "pack" free software file archiving solution might be the right thing for you

license

gpl3+

usage examples

create an automatically named package from multiple source files

pack /tmp/1 /tmp/2

creates file "1.tar"

create an explicity named package from multiple source files

pack -t 3.tar /tmp/1 /tmp/2

creates file "3.tar"

create an encrypted package

pack -e 1 2

creates file "1.tar.e"

create a compressed and encrypted package

pack -ec 1 2

creates file "1.tar.xz.e"

completely extract a package into the current working directory

pack -u 1.tar.xz

only decompress into the current working directory

pack -uc 1.tar.xz

creates file "1.tar"

completely extract a package into a target directory

pack -ut /tmp 1.tar.xz

compress a single file

pack 1

creates 1.xz

tar is not used because it is only one file

pack a list of paths read from standard input

pack -p --

creates a tar archive with every file from a newline separated list read from standard-input

general

two modes: pack and unpack

command-line interface and library

uses stream processing and separate processes

when unpacking, multiple given source paths are unpacked in series

format layers

designated by filename suffixes

layer-name and filename-suffix: encryption e compression xz compound tar

there is a layer order that is adhered to (tar/xz/scrypt, for example the order xz/scrypt/tar is unsupported)

command-line interface

$ pack --help

parameters
  options ... source-path ...
description
  one program for file and directory compounding, compression and encryption
options
  --about|-a
  --compression|-c
  --delete-input-files|-d
  --dry-run
  --encryption|-e
  --help|-h
  --implicit-compression|-i [number]  add compression if source is below a certain size. the optional value is in megabits.
  --interface
  --read-paths|-p string
  --target|-t string
  --unpack|-u

dependencies

>= https://www.gnu.org/software/guile/ 2

sph-lib

optional

tar (usually already installed)

xz-utils

scrypt file encryption utility

installation

manual

install all dependencies if there are some

download

download

alternatives: releases, git clone git://sph.mn/sph-pack

unpack

unpack the downloaded archive

for example

tar -xf sph-pack.tgz

-x is for extract

-f is for the source file name

install

cd sph-pack
su root
./exe/install

in most cases the installer only copies files

the install script might have a "--help" option that lists more install options

behaviour in detail

source: given source file paths or other source

layers: layers requested (compression, compounding, encryption) for processing

actions

1

source: path ...

layers: layer-already-indicated-in-path ...

skip-indicated-layers

2

unpack: true

source: standard-input

layers: compound

not-supported

3

unpack: true

source: standard-input

layers: compression

target: false/directory

standard-output

4

unpack: true

source: paths

target: false

target: current-working-directory

5

unpack: true

layers: false

unpack-all-found-layers

6

unpack: true

source: paths-with-and-without-compression

layer-compression: true

remove-compression-from-paths-with-compression

target: only-move-processed-files

7

source: standard-input/paths

target: "--"

target: standard-output

8

source: standard-input

target: false

target: standard-output

9

source: paths

target: false

target: source-filename->target

10

source: paths

layer-compound: true

11

source: directory-path

layer-compound: true

12

source: path

layers: compound

do-nothing

13

layers: false

layers: compression


tags: application program overview start q1 computer encryption compounding compression sph-pack functional