Bladeren bron

feat(deps): add zstd-1.5.7 source code

clanker 1 maand geleden
bovenliggende
commit
3a1697225c

+ 55 - 0
zstd-1.5.7/MANIFEST.usm

@@ -0,0 +1,55 @@
+{
+  "name": "zstd",
+  "version": "1.5.7",
+  "summary": "Zstandard - Fast real-time compression algorithm",
+  "licences": [
+    {
+      "name": "BSD",
+      "category": "libre",
+      "text": "LICENSE"
+    }
+  ],
+  "provides": {
+    "bin:zstd": "as-expected",
+    "bin:zstdcat": "as-expected",
+    "bin:zstdgrep": "as-expected",
+    "bin:zstdless": "as-expected",
+    "bin:zstdmt": "as-expected",
+    "bin:unzstd": "as-expected",
+    "lib:libzstd.so": "as-expected",
+    "man:man1/zstd.1": "as-expected",
+    "man:man1/zstdcat.1": "as-expected",
+    "man:man1/zstdgrep.1": "as-expected",
+    "man:man1/zstdless.1": "as-expected",
+    "man:man1/unzstd.1": "as-expected"
+  },
+  "depends": {
+    "runtime": [
+      "lib:libc.so.6"
+    ],
+    "build": [
+      "bin:gcc",
+      "bin:make"
+    ],
+    "manage": [
+      "bin:bash",
+      "bin:rm"
+    ],
+    "acquire": [
+      "bin:wget",
+      "bin:tar",
+      "bin:gzip"
+    ]
+  },
+  "execs": {
+    "acquire": "usm-scripts/acquire.sh",
+    "build": "usm-scripts/build.sh",
+    "install": "usm-scripts/install.sh",
+    "test": "usm-scripts/test.sh"
+  },
+  "flags": [
+    "simpleBuildEnvironment"
+  ],
+  "md": "PACKAGE.md",
+  "url": "https://facebook.github.io/zstd/"
+}

+ 38 - 0
zstd-1.5.7/PACKAGE.md

@@ -0,0 +1,38 @@
+# Zstandard (zstd) 1.5.7
+
+Zstandard is a fast compression algorithm providing high compression ratios. It offers a very wide range of compression/speed trade-offs, while being backed by a very fast decoder.
+
+## Features
+
+- **Real-time compression**: Suitable for scenarios where compression speed is critical
+- **High compression ratios**: Comparable to zlib with significantly faster compression
+- **Wide range of levels**: From ultra-fast to maximum compression
+- **Small data optimization**: Special mode for compressing small data chunks
+- **Dictionary compression**: Enhanced compression for repetitive data patterns
+- **Streaming support**: Compress and decompress data streams
+
+## Applications
+
+Zstandard is designed for modern systems and is particularly well-suited for:
+- Real-time backup systems
+- Network data transfer
+- File compression utilities
+- Database compression
+- Container image compression
+
+## Performance
+
+Zstandard provides significantly better compression ratios than lz4 and much faster compression than zlib, making it an excellent general-purpose compression algorithm for a wide range of use cases.
+
+## Included Programs
+
+- **zstd**: Main compression/decompression utility
+- **zstdcat**: Decompress to stdout (link to zstd)
+- **zstdgrep**: Run grep on compressed files
+- **zstdless**: Run less on compressed files
+- **zstdmt**: Multi-threaded version (link to zstd)
+- **unzstd**: Decompression utility (link to zstd)
+
+## Library
+
+The package includes the `libzstd` shared library, allowing other applications to use Zstandard compression capabilities.

+ 23 - 0
zstd-1.5.7/usm-scripts/acquire.sh

@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+# Zstd source acquisition script
+# Downloads and extracts zstd-1.5.7 source code
+
+ARCHIVE_URL="https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
+ARCHIVE_NAME="zstd-1.5.7.tar.gz"
+EXTRACT_DIR="sources/zstd"
+
+echo "Downloading zstd source..."
+wget -O ${ARCHIVE_NAME} ${ARCHIVE_URL}
+
+echo "Creating extraction directory..."
+mkdir -p ${EXTRACT_DIR}
+
+echo "Extracting archive..."
+tar -xzf ${ARCHIVE_NAME} -C ${EXTRACT_DIR} --strip-components=1
+
+echo "Cleaning up..."
+rm ${ARCHIVE_NAME}
+
+echo "Source acquisition complete."

+ 16 - 0
zstd-1.5.7/usm-scripts/build.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+# Zstd build script
+# Compiles zstd with proper prefix configuration
+
+build_dir=$1
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# Source is in sources/zstd relative to package root
+src_dir="sources/zstd"
+
+echo "Building zstd..."
+make -C ${src_dir} prefix=${PREFIX}
+
+echo "Build complete."

+ 21 - 0
zstd-1.5.7/usm-scripts/install.sh

@@ -0,0 +1,21 @@
+#!/bin/bash
+set -e
+
+# Zstd install script
+# Installs zstd with proper prefix configuration
+
+build_dir=$1
+install_dir=$2
+install_type=$3
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# Source is in sources/zstd relative to package root
+src_dir="sources/zstd"
+
+echo "Installing zstd..."
+make -C ${src_dir} prefix=${DESTDIR}${PREFIX} install
+
+echo "Removing static library..."
+rm -v ${DESTDIR}${LIBDIR}/libzstd.a
+
+echo "Installation complete."

+ 16 - 0
zstd-1.5.7/usm-scripts/test.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+# Zstd test script
+# Runs the zstd test suite
+
+build_dir=$1
+
+# With simpleBuildEnvironment flag, we're already in build directory
+# Source is in sources/zstd relative to package root
+src_dir="sources/zstd"
+
+echo "Running zstd test suite..."
+make -C ${src_dir} check
+
+echo "All tests passed."