uc2 3.0.0a4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. uc2-3.0.0a4/.gitattributes +10 -0
  2. uc2-3.0.0a4/.gitignore +39 -0
  3. uc2-3.0.0a4/CMakeLists.txt +29 -0
  4. uc2-3.0.0a4/CREDITS.md +81 -0
  5. uc2-3.0.0a4/LICENSE +674 -0
  6. uc2-3.0.0a4/LICENSES/BSD-2-Clause.txt +24 -0
  7. uc2-3.0.0a4/LICENSES/LGPL-3.0-only.txt +165 -0
  8. uc2-3.0.0a4/PKG-INFO +127 -0
  9. uc2-3.0.0a4/README.md +179 -0
  10. uc2-3.0.0a4/ROADMAP.md +453 -0
  11. uc2-3.0.0a4/cli/CMakeLists.txt +59 -0
  12. uc2-3.0.0a4/cli/src/compat/compat_dos.c +158 -0
  13. uc2-3.0.0a4/cli/src/compat/compat_win32.c +384 -0
  14. uc2-3.0.0a4/cli/src/compat/getopt.c +68 -0
  15. uc2-3.0.0a4/cli/src/compat/include/dos/err.h +18 -0
  16. uc2-3.0.0a4/cli/src/compat/include/dos/fnmatch.h +15 -0
  17. uc2-3.0.0a4/cli/src/compat/include/err.h +21 -0
  18. uc2-3.0.0a4/cli/src/compat/include/fnmatch.h +17 -0
  19. uc2-3.0.0a4/cli/src/compat/include/msvc/dirent.h +28 -0
  20. uc2-3.0.0a4/cli/src/compat/include/msvc/getopt.h +12 -0
  21. uc2-3.0.0a4/cli/src/compat/include/msvc/unistd.h +42 -0
  22. uc2-3.0.0a4/cli/src/compat/include/msvc/utime.h +30 -0
  23. uc2-3.0.0a4/cli/src/compat/include/posix/sys/stat.h +6 -0
  24. uc2-3.0.0a4/cli/src/compat/include/posix/sys/utime.h +9 -0
  25. uc2-3.0.0a4/cli/src/compat/include/posix/unistd.h +7 -0
  26. uc2-3.0.0a4/cli/src/main.c +2480 -0
  27. uc2-3.0.0a4/cli/uc2.1 +200 -0
  28. uc2-3.0.0a4/cmake/README-djgpp.md +79 -0
  29. uc2-3.0.0a4/cmake/UC2Platform.cmake +12 -0
  30. uc2-3.0.0a4/cmake/bin2c.cmake +38 -0
  31. uc2-3.0.0a4/cmake/djgpp.cmake +34 -0
  32. uc2-3.0.0a4/contrib/libarchive/CMakeLists.txt +57 -0
  33. uc2-3.0.0a4/contrib/libarchive/LICENSE.BSD-2-Clause +24 -0
  34. uc2-3.0.0a4/contrib/libarchive/README.md +69 -0
  35. uc2-3.0.0a4/contrib/libarchive/archive_platform_config.uc2.h.in +56 -0
  36. uc2-3.0.0a4/contrib/libarchive/archive_read_support_format_uc2.c +524 -0
  37. uc2-3.0.0a4/contrib/libarchive/build_bsdtar.py +46 -0
  38. uc2-3.0.0a4/contrib/mc/README.md +36 -0
  39. uc2-3.0.0a4/contrib/mc/mc.ext.ini +7 -0
  40. uc2-3.0.0a4/contrib/mc/uc2 +91 -0
  41. uc2-3.0.0a4/contrib/totalcommander/CMakeLists.txt +30 -0
  42. uc2-3.0.0a4/contrib/totalcommander/README.md +67 -0
  43. uc2-3.0.0a4/contrib/totalcommander/pluginst.inf +8 -0
  44. uc2-3.0.0a4/contrib/totalcommander/uc2_wcx.c +307 -0
  45. uc2-3.0.0a4/docs/_static/.gitkeep +0 -0
  46. uc2-3.0.0a4/docs/blog/uc2-revival-writeup.md +201 -0
  47. uc2-3.0.0a4/docs/building.rst +115 -0
  48. uc2-3.0.0a4/docs/conf.py +29 -0
  49. uc2-3.0.0a4/docs/format.rst +196 -0
  50. uc2-3.0.0a4/docs/history.rst +35 -0
  51. uc2-3.0.0a4/docs/index.rst +22 -0
  52. uc2-3.0.0a4/docs/integrations-2026-11-05.md +57 -0
  53. uc2-3.0.0a4/docs/library.rst +174 -0
  54. uc2-3.0.0a4/docs/license-audit.md +188 -0
  55. uc2-3.0.0a4/docs/quickstart.rst +26 -0
  56. uc2-3.0.0a4/docs/requirements.txt +2 -0
  57. uc2-3.0.0a4/docs/roadmap.rst +42 -0
  58. uc2-3.0.0a4/docs/usage.rst +93 -0
  59. uc2-3.0.0a4/lib/CMakeLists.txt +45 -0
  60. uc2-3.0.0a4/lib/include/uc2/libuc2.h +182 -0
  61. uc2-3.0.0a4/lib/include/uc2/uc2_blake3.h +64 -0
  62. uc2-3.0.0a4/lib/include/uc2/uc2_blockstore.h +66 -0
  63. uc2-3.0.0a4/lib/include/uc2/uc2_cdc.h +55 -0
  64. uc2-3.0.0a4/lib/include/uc2/uc2_delta.h +50 -0
  65. uc2-3.0.0a4/lib/include/uc2/uc2_dict.h +76 -0
  66. uc2-3.0.0a4/lib/include/uc2/uc2_ingest.h +80 -0
  67. uc2-3.0.0a4/lib/include/uc2/uc2_lz4.h +46 -0
  68. uc2-3.0.0a4/lib/include/uc2/uc2_merkle.h +66 -0
  69. uc2-3.0.0a4/lib/include/uc2/uc2_ots.h +168 -0
  70. uc2-3.0.0a4/lib/include/uc2/uc2_preprocess.h +67 -0
  71. uc2-3.0.0a4/lib/include/uc2/uc2_rans.h +92 -0
  72. uc2-3.0.0a4/lib/include/uc2/uc2_sha256.h +29 -0
  73. uc2-3.0.0a4/lib/include/uc2/uc2_simhash.h +44 -0
  74. uc2-3.0.0a4/lib/include/uc2/uc2_version.h.in +9 -0
  75. uc2-3.0.0a4/lib/src/compress.c +1110 -0
  76. uc2-3.0.0a4/lib/src/decompress.c +1769 -0
  77. uc2-3.0.0a4/lib/src/list.h +83 -0
  78. uc2-3.0.0a4/lib/src/super.bin +0 -0
  79. uc2-3.0.0a4/lib/src/super_data.S.in +16 -0
  80. uc2-3.0.0a4/lib/src/uc2_blake3.c +275 -0
  81. uc2-3.0.0a4/lib/src/uc2_blockstore.c +109 -0
  82. uc2-3.0.0a4/lib/src/uc2_cdc.c +124 -0
  83. uc2-3.0.0a4/lib/src/uc2_delta.c +209 -0
  84. uc2-3.0.0a4/lib/src/uc2_dict.c +85 -0
  85. uc2-3.0.0a4/lib/src/uc2_ingest.c +443 -0
  86. uc2-3.0.0a4/lib/src/uc2_internal.h +105 -0
  87. uc2-3.0.0a4/lib/src/uc2_lz4.c +185 -0
  88. uc2-3.0.0a4/lib/src/uc2_merkle.c +114 -0
  89. uc2-3.0.0a4/lib/src/uc2_ots.c +343 -0
  90. uc2-3.0.0a4/lib/src/uc2_preprocess.c +195 -0
  91. uc2-3.0.0a4/lib/src/uc2_rans.c +185 -0
  92. uc2-3.0.0a4/lib/src/uc2_sha256.c +133 -0
  93. uc2-3.0.0a4/lib/src/uc2_simhash.c +67 -0
  94. uc2-3.0.0a4/lib/src/uc2_tables.c +60 -0
  95. uc2-3.0.0a4/pyproject.toml +56 -0
  96. uc2-3.0.0a4/python/CMakeLists.txt +9 -0
  97. uc2-3.0.0a4/python/README.md +101 -0
  98. uc2-3.0.0a4/python/native.c +300 -0
  99. uc2-3.0.0a4/python/tests/test_uc2.py +282 -0
  100. uc2-3.0.0a4/python/uc2/__init__.py +232 -0
  101. uc2-3.0.0a4/python/uc2/__main__.py +3 -0
  102. uc2-3.0.0a4/python/uc2/_cli.py +17 -0
  103. uc2-3.0.0a4/python/uc2/_extract.py +153 -0
  104. uc2-3.0.0a4/python/uc2/py.typed +0 -0
  105. uc2-3.0.0a4/scripts/benchmark_collections.py +165 -0
  106. uc2-3.0.0a4/scripts/gen-bboard-post.sh +83 -0
  107. uc2-3.0.0a4/scripts/package_cli.py +75 -0
  108. uc2-3.0.0a4/tests/CMakeLists.txt +223 -0
  109. uc2-3.0.0a4/tests/archives/basic.uc2 +0 -0
  110. uc2-3.0.0a4/tests/archives/empty.uc2 +0 -0
  111. uc2-3.0.0a4/tests/archives/random.uc2 +0 -0
  112. uc2-3.0.0a4/tests/archives/single.uc2 +0 -0
  113. uc2-3.0.0a4/tests/archives/zeros.uc2 +0 -0
  114. uc2-3.0.0a4/tests/corpus/allbytes.bin +0 -0
  115. uc2-3.0.0a4/tests/corpus/empty.dat +0 -0
  116. uc2-3.0.0a4/tests/corpus/hello.txt +1 -0
  117. uc2-3.0.0a4/tests/corpus/random.bin +0 -0
  118. uc2-3.0.0a4/tests/corpus/textfile.txt +30 -0
  119. uc2-3.0.0a4/tests/corpus/zeros.bin +0 -0
  120. uc2-3.0.0a4/tests/fuzz/README.md +57 -0
  121. uc2-3.0.0a4/tests/fuzz/fuzz_extract.c +78 -0
  122. uc2-3.0.0a4/tests/fuzz/fuzz_replay.c +53 -0
  123. uc2-3.0.0a4/tests/fuzz/fuzz_roundtrip.c +199 -0
  124. uc2-3.0.0a4/tests/fuzz/regressions/len0-match-underflow.uc2 +0 -0
  125. uc2-3.0.0a4/tests/fuzz/seeds/basic.uc2 +0 -0
  126. uc2-3.0.0a4/tests/fuzz/seeds/empty.uc2 +0 -0
  127. uc2-3.0.0a4/tests/fuzz/seeds/random.uc2 +0 -0
  128. uc2-3.0.0a4/tests/fuzz/seeds/single.uc2 +0 -0
  129. uc2-3.0.0a4/tests/fuzz/seeds/zeros.uc2 +0 -0
  130. uc2-3.0.0a4/tests/scripts/bitdump.py +392 -0
  131. uc2-3.0.0a4/tests/scripts/check_assert_side_effects.py +86 -0
  132. uc2-3.0.0a4/tests/scripts/check_bsdtar.py +54 -0
  133. uc2-3.0.0a4/tests/scripts/check_integrations.py +108 -0
  134. uc2-3.0.0a4/tests/scripts/create_archives.sh +104 -0
  135. uc2-3.0.0a4/tests/scripts/cross_check_ots.py +119 -0
  136. uc2-3.0.0a4/tests/scripts/dos_smoke.sh +109 -0
  137. uc2-3.0.0a4/tests/scripts/roundtrip_dosbox.sh +184 -0
  138. uc2-3.0.0a4/tests/src/test_blake3.c +127 -0
  139. uc2-3.0.0a4/tests/src/test_blockstore.c +255 -0
  140. uc2-3.0.0a4/tests/src/test_cdc.c +242 -0
  141. uc2-3.0.0a4/tests/src/test_delta.c +162 -0
  142. uc2-3.0.0a4/tests/src/test_dict.c +107 -0
  143. uc2-3.0.0a4/tests/src/test_extract.c +213 -0
  144. uc2-3.0.0a4/tests/src/test_identify.c +53 -0
  145. uc2-3.0.0a4/tests/src/test_ingest.c +288 -0
  146. uc2-3.0.0a4/tests/src/test_libarchive_uc2.c +134 -0
  147. uc2-3.0.0a4/tests/src/test_lz4.c +129 -0
  148. uc2-3.0.0a4/tests/src/test_merkle.c +193 -0
  149. uc2-3.0.0a4/tests/src/test_ots.c +343 -0
  150. uc2-3.0.0a4/tests/src/test_preprocess.c +184 -0
  151. uc2-3.0.0a4/tests/src/test_rans.c +226 -0
  152. uc2-3.0.0a4/tests/src/test_roundtrip.c +521 -0
  153. uc2-3.0.0a4/tests/src/test_sha256.c +112 -0
  154. uc2-3.0.0a4/tests/src/test_simhash.c +97 -0
  155. uc2-3.0.0a4/tests/test_cli_bigfile.cmake +51 -0
  156. uc2-3.0.0a4/tests/test_cli_create.cmake +63 -0
  157. uc2-3.0.0a4/tests/test_cli_dirs.cmake +95 -0
  158. uc2-3.0.0a4/tests/test_cli_ingest.cmake +128 -0
  159. uc2-3.0.0a4/tests/test_cli_libarchive.cmake +39 -0
  160. uc2-3.0.0a4/tests/test_cli_master.cmake +87 -0
  161. uc2-3.0.0a4/tests/wcx/Dockerfile +5 -0
  162. uc2-3.0.0a4/tests/wcx/run_fixture.py +62 -0
  163. uc2-3.0.0a4/tests/wcx/test_wcx.c +92 -0
@@ -0,0 +1,10 @@
1
+ # Preserve CRLF line endings in original DOS sources
2
+ original/UC2_source/** -text
3
+ original/UC2_source/**/*.exe binary
4
+ original/UC2_source/**/*.DAT binary
5
+ original/UC2_source/**/*.LIB binary
6
+ original/UC2_source/**/*.PRJ binary
7
+
8
+ # Test corpus and archives must be byte-exact
9
+ tests/corpus/** binary
10
+ tests/archives/** binary
uc2-3.0.0a4/.gitignore ADDED
@@ -0,0 +1,39 @@
1
+ # Build
2
+ build/
3
+ build-*/
4
+ cmake-build-*/
5
+
6
+ # CTest run outputs (when ctest is invoked outside of build/)
7
+ Testing/
8
+
9
+ # Python bytecode
10
+ __pycache__/
11
+ *.pyc
12
+ dist/
13
+ wheelhouse/
14
+ *.egg-info/
15
+ .pytest_cache/
16
+
17
+ # Docs build
18
+ docs/_build/
19
+
20
+ # IDE
21
+ .idea/
22
+ .vscode/
23
+ *.swp
24
+ *~
25
+
26
+ # OS
27
+ .DS_Store
28
+ Thumbs.db
29
+
30
+ # Generated outreach draft (produced by scripts/gen-bboard-post.sh)
31
+ bboard-post.draft.txt
32
+
33
+ # Original downloads
34
+ original/*.zip
35
+
36
+ # Build artifacts in preserved originals
37
+ original/unuc2-0.6/*.o
38
+ original/unuc2-0.6/*.a
39
+ original/unuc2-0.6/unuc2
@@ -0,0 +1,29 @@
1
+ cmake_minimum_required(VERSION 3.16)
2
+ project(UC2
3
+ VERSION 3.0.0
4
+ DESCRIPTION "UltraCompressor II — cross-platform revival"
5
+ LANGUAGES C ASM
6
+ )
7
+
8
+ include(cmake/UC2Platform.cmake)
9
+
10
+ option(UC2_BUILD_PYTHON "Build the Python reader extension and bundled CLI" OFF)
11
+ set(UC2_VERSION_LABEL "${PROJECT_VERSION}" CACHE STRING "Version displayed by the CLI")
12
+ if(UC2_BUILD_PYTHON AND MSVC)
13
+ # Standalone CLI downloads must not require a separately installed VC runtime.
14
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
15
+ endif()
16
+
17
+ add_subdirectory(lib)
18
+ add_subdirectory(cli)
19
+ add_subdirectory(contrib/libarchive)
20
+ add_subdirectory(contrib/totalcommander)
21
+ if(UC2_BUILD_PYTHON)
22
+ add_subdirectory(python)
23
+ endif()
24
+
25
+ option(UC2_BUILD_TESTS "Build tests" ON)
26
+ if(UC2_BUILD_TESTS AND NOT DJGPP)
27
+ enable_testing()
28
+ add_subdirectory(tests)
29
+ endif()
uc2-3.0.0a4/CREDITS.md ADDED
@@ -0,0 +1,81 @@
1
+ # Credits
2
+
3
+ ## Original UltraCompressor II
4
+
5
+ **Nico de Vries** created UltraCompressor II (1992--1996), a DOS archiver
6
+ with LZ77+Huffman compression, master-block deduplication, and file
7
+ versioning. The original source code is preserved in `original/UC2_source/`.
8
+
9
+ - Website: <https://nicodevries.com/professional/>
10
+
11
+ ## 2015 LGPL Source Release
12
+
13
+ In December 2015, **Vladislav Sagunov** asked Nico de Vries whether
14
+ the UC2 source could be re-released under a free licence. De Vries
15
+ agreed and personally re-published the full UC2 source under the GNU
16
+ LGPL-3.0 (with a small Borland C/C++ runtime carve-out for DOS-specific
17
+ code). The release notes are preserved verbatim in
18
+ `original/UC2_source/Read Me First.txt`.
19
+
20
+ ## Portable Decompressor (unuc2 / libunuc2)
21
+
22
+ **Jan Bobrowski** wrote a clean-room portable decompressor (2020--2021) that
23
+ forms the foundation of this project's decompression engine. The library
24
+ (`libunuc2`) is licensed under LGPL-3.0; the CLI tool (`unuc2`) is licensed
25
+ under GPL-3.0-or-later.
26
+
27
+ The following files in this repository derive directly from Bobrowski's
28
+ work and retain his licence (see `docs/license-audit.md` for the full
29
+ provenance table):
30
+
31
+ - `lib/src/decompress.c` (LGPL-3.0-only) -- derived from `libunuc2.c`
32
+ - `lib/src/list.h` (LGPL-3.0-only) -- byte-identical to upstream
33
+ - `lib/include/uc2/libuc2.h` (LGPL-3.0-only) -- derived from `libunuc2.h`
34
+ - `cli/src/main.c` (GPL-3.0-or-later) -- derived from `unuc2.c`,
35
+ with substantial additions for archive creation, OTS, and benchmarking
36
+ - `contrib/totalcommander/uc2_wcx.c` (LGPL-3.0-only), adapted from the WCX prototype
37
+ - `cli/src/compat/compat_win32.c` (LGPL-3.0-only)
38
+ - `cli/src/compat/compat_dos.c` (LGPL-3.0-only, DOS adaptation by Valetov)
39
+
40
+ The SuperMaster dictionary (`lib/src/super.bin`) is bit-identical to the
41
+ copy shipped in `original/unuc2-0.6/` and to the data extracted from
42
+ de Vries's 1992 binaries.
43
+
44
+ - Website: <http://torinak.com/~jb/unuc2/>
45
+ - Original source preserved in `original/unuc2-0.6/`
46
+
47
+ ## Additional Contributors
48
+
49
+ - **Danny Bezemer** -- co-authored UC2 with de Vries during the
50
+ original 1992-1996 development.
51
+ - **Jan-Pieter Cornet** -- early testing, archive samples, and format
52
+ documentation contributions to the unuc2 project.
53
+
54
+ ## UC2 v3.0.0 Revival
55
+
56
+ **Eremey Valetov** -- project revival, including:
57
+
58
+ - CMake build system and cross-platform porting (Linux, macOS, MSVC, DJGPP)
59
+ - LZ77+Huffman compression engine (compatible with original UC2 Pro)
60
+ - rANS entropy coder (method 10, levels 6--9)
61
+ - Content-defined chunking (CDC) with Gear rolling hash
62
+ - Merkle DAG content addressing
63
+ - Cross-archive block store for shared deduplication
64
+ - SimHash near-duplicate detection
65
+ - Delta compression for binary patching
66
+ - Content-aware preprocessing (BCJ, BWT, delta filter)
67
+ - LZ4 ultra-fast compression
68
+ - BLAKE3 cryptographic hashing
69
+ - SHA-256 (FIPS 180-4) implementation
70
+ - OpenTimestamps integration (proof parser, walker, archive trailer)
71
+ - Dictionary metadata for cross-archive sharing
72
+ - Backward compatibility with original UC2 Pro (verified via DOSBox-X)
73
+ - Automated test infrastructure (19 unit tests, DOSBox-X cross-tool testing)
74
+
75
+ New core modules are licensed GPL-3.0-or-later by Eremey Valetov (2026).
76
+ The libarchive adapter and independently written integration glue are
77
+ dual-licensed GPL-3.0-or-later OR BSD-2-Clause. Derived files retain their
78
+ upstream licenses. See `docs/license-audit.md` for the per-file
79
+ provenance table and the LGPL-3.0 / GPL-3.0 chain rationale.
80
+
81
+ - GitHub: <https://github.com/evvaletov/uc2>