fibrs

This crate is a Rust port of AVF_SPLINE_GENERATOR 0.2.0
(https://github.com/Qualzz/AVF_SPLINE_GENERATOR, commit bee798f7), licensed under the
Apache License, Version 2.0. The tracing kernels (src/kernels.rs), the field preparation
(src/axes.rs, src/fields.rs), the finishing pass (src/finish.rs), the AFV writer
(src/afv.rs) and the command line (src/run.rs) reproduce that project's algorithms,
constants, schema and messages. The upstream project ships no NOTICE file. The
Apache License 2.0 text, under which this crate is licensed too, is in licenses/apache-2.0.txt.

src/pyfmt.rs ports NumPy 2.4.6's unsigned-integer introsort (npysort/quicksort.cpp,
aquicksort_) line for line, so that np.argsort's order of ties is reproduced. NumPy is
licensed under the BSD 3-Clause licence; its full text is in licenses/numpy.txt.

The binary statically links these C libraries, built from the sources their Rust crates
vendor. Their full licence texts are in licenses/:

- c-blosc 1.21.6 (blosc-src 0.3.8): BSD-3-Clause, Copyright (c) 2009-2018 Francesc Alted,
  Copyright (c) 2019-present Blosc Development Team (licenses/c-blosc.txt). Its blosclz
  codec derives from FastLZ (MIT, Copyright (C) 2005-2020 Ariya Hidayat,
  licenses/c-blosc-fastlz.txt) and its bit shuffle from Bitshuffle (MIT, Copyright (c)
  2014 Kiyoshi Masui, licenses/c-blosc-bitshuffle.txt)
- LZ4 1.10.0 (lz4-sys): BSD-2-Clause, Copyright (c) 2011-2020 Yann Collet
  (licenses/lz4.txt)
- mimalloc 3.3.2 (libmimalloc-sys 0.1.49), the binary's allocator: MIT, Copyright (c) 2018-2025
  Microsoft Corporation, Daan Leijen (licenses/mimalloc.txt)
- Zstandard 1.5.7 (zstd-sys): BSD-3-Clause, Copyright (c) Meta Platforms, Inc. and
  affiliates (licenses/zstd.txt)
- zlib (libz-sys, static): zlib licence, Copyright (C) Jean-loup Gailly and Mark Adler
  (licenses/zlib.txt)
- SQLite (rusqlite, bundled): public domain

The Rust crates it links are MIT or Apache-2.0 licensed; Cargo.lock lists them.

At run time the binary loads numpy's bundled OpenBLAS (libscipy_openblas64_*, BSD-3-Clause)
from the Python environment it is installed into; that library is not distributed here.

fibrs predict runs Qual's AFV fibre model V2
(https://huggingface.co/Qualzz20/afv_fiber_9um_v2). The model and its weights are Qual's:
fibrs ships neither and reads the snapshot you point it at. At run time it loads NVIDIA's
cuDNN and cuBLAS from the system or from NVIDIA's pip packages; they are not distributed here.

When a run opts in (FIBRS_NVCOMP=on or a path), GPU trace finishing loads NVIDIA's nvCOMP 6
(libnvcomp.so.6) at run time, from NVIDIA's own PyPI package nvidia-libnvcomp-cu12
(installed by the gpu-zstd extra), the system's library path or a path given in
FIBRS_NVCOMP, to decode prediction slabs on the GPU.
nvCOMP is proprietary, licensed by NVIDIA under its own SDK licence agreement, and is not
distributed here; without it fibrs decodes on the CPU.

Its tiling, padding, blend, quantisation, tracing downsample and, in --mode villa, its choice
of tiles and output chunks follow villa's lasagna.qualzz_inference and
lasagna.tiled_predict3d (https://github.com/ScrollPrize/villa, commit 97fb9336c);
src/predict/villa.rs reimplements villa's tile-selection rule. villa is MIT licensed,
Copyright (c) 2024 Vesuvius Challenge; the full text is in licenses/villa-MIT.txt.

On Linux x86-64 the binary includes fibrs predict's engine, volkit, whose embedded GPU kernels
contain compiled code from NVIDIA libdevice (CUDA Toolkit 13.2), distributed under the NVIDIA
CUDA Toolkit End User License Agreement and not under this crate's licence, and code compiled
from NVIDIA's cuda-oxide device crate (Apache-2.0, Copyright (c) 2024-2026 NVIDIA CORPORATION
& AFFILIATES). licenses/nvidia-gpu-kernels.txt gives the details and the terms that apply.
