zchunk-1.5.5-1.fc46.src.rpm
Backtick shell command-substitution syntaxBasename is uppercase README.md
SHA-25622a45e23f12380fa62b3569327a9b9bb1ff9400fb5b81705dbe43fba4e9572de
Evidence
3:18… %{?dist}
4Summary: Compressed file format that allows easy deltas
5License: BSD-2-Clause AND MIT
6URL: https://github.com/zchunk/zchunk
7Source0: %{url}/archive/%{version}/ …
47:3… brary, libzck.
48
49%prep
50%autosetup
51# Remove bundled sha libraries
52rm -rf src/lib/hash/sha*
53
54%build
⋯7 lines
121:48… dora_40_Mass_Rebuild
122
123* Tue Dec 19 2023 Jonathan Dieter <[email protected]> - 1.4.0-1
124- Add native OpenSSL 3 compatibility
125- Add new function for getting zchunk context from chunk
126- Fix bug when assembl …
1FROM quay.io/centos/centos:stream9
2RUN dnf -y install "dnf-command(config-manager)" && dnf -y config-manager --set-enabled crb && dnf -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" && rm -rf /var/cache/yum
1#!/usr/bin/python3
2
3import re
4import sys, os, os.path, subprocess
5import argparse, tempfile, shutil
6
7parser = argparse.ArgumentParser(description="Creates a zstd dictionary from a file that will be chunked")
8parser.add_argument("split_string", help="String to use to split the file(s)")
9parser.add_argument("file", nargs="+", help="File(s) to use to generate the dictionary")
10parser.add_argument("-s", "--size", action="store", type=int, default=112640, help="Dictionary size")
11args = parser.parse_args()
12
⋯7 lines
20 dict_file = os.path.basename(args.file[0]) + ".dict"
21
22# Split file into chunks and store them in a temporary directory
23for fn in args.file:
24 f = open(fn, 'r')
25 data = f.read()
26 f.close()
27 data = checksum_regex.sub("", data)
28 data_list = data.split(args.split_string)
29 count = 0
30 for data in data_list:
31 filename = "%s/%s.%06i" % (temp_dir, os.path.basename(fn), count)
32 f = open(filename, 'w')
33 f.write(args.split_string)
34 f.write(data)
35 f.close()
36 count += 1
37
38# Create dictionary from chunks in the temporary directory
39filelist = os.listdir(temp_dir)
40filelist = ["%s/%s" % (temp_dir, f) for f in filelist]
41run_cmd = ["zstd", "--train"] + filelist + ["-o", dict_file, "--maxdict=%i" % args.size]
42try:
43 subprocess.run(run_cmd)
44 shutil.rmtree(temp_dir)
45except subprocess.CalledProcessError:
46 shutil.rmtree(temp_dir)
47 sys.exit(1)
Showing the top 5 files — 1 more file (5 regions) not shown.
No evidence locations were recorded for this file. Raw result