Skip to content

neo2043/pack.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compression Tool (pack.c)

Compression Tool is a command-line utility written in C that compresses and decompresses files using a ZSTD. It aims to provide fast and efficient file size reduction..

Table of Contents

Features

  • Fast Compression and Decompression: Designed to offer high-speed compression with minimal loss of data.
  • Command-Line Interface: Easy-to-use CLI for quick file compression and decompression.
  • Cross-Platform: Works on major operating systems including Linux and Windows.

Requirements

  • Windows: Requires MinGW or similar to compile.
  • Sccache: Sccache is a ccache-like tool.
  • Compiler: GCC or any C99 compatible compiler.
  • CMake (optional): For build automation, recommended for easier setup.
  • Nur: a taskrunner based on nu shell.

Installation

Using CMake (Cross-Platform)

  1. Clone the repository:

    git clone --recurse-submodules -j8 https://github.com/neo2043/pack.c.git
    cd pack.c
    nur get sqlite
    nur patch
  2. Build the project:

    nur build pack
  3. Run the tool:

    ./build-[architecture]-[os-name]/pack[.exe]

You can copy the project binary to a folder in path to use it globally in terminal

Windows

  1. Install MinGW or another C compiler.
  2. Follow the CMake instructions above to build.

Usage

The compression tool can be used via the command line. Below are some basic usage instructions.

Command Syntax

./pack [OPTIONS] [PATH TO ARCHIVE] [PATH TO FFOLDER]

Options

  • -c, --compress <file/folder>: Compress the specified file.
  • -l, --compression-level: compression level.
  • -C, --chunk-size <num>: Chunk size in MB.
  • -f, --archive <file>: path to .cpack archive.
  • -j, --thread-num: number of threads.
  • -v, --verbose: verbose.
  • -h, --help: Show help message.

Example Commands

  1. Compress a file:

    ./pack[.exe] -cvf example.cpack  example.txt
  2. Decompress a file:

    ./pack[.exe] -xvf example.cpack .

Acknowledgments

This is based on the original implementation by PackOrganiztion

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

A cross platform compression tool based on sqlite and zstd written in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors