- Update to 1.6.1:

* Changes
    + Improve warning levels by the compiler in CI.
    + Switch to GitHub actions for some CI builds.
    + Add configure check for cpuid systems.
  * Bug fixes
    + Use unsigned chars for ctype macros in the name tokeniser.
      On many systems this was already mitigated against, but on
      some OSes a char > 128 could trigger a buffer underrun.
    + Improve AVX512 compiler support.
    + Fix -std=c99 -pendantic pedantry (#117)

OBS-URL: https://build.opensuse.org/package/show/science/htscodecs?expand=0&rev=9
This commit is contained in:
Ferdinand Thiessen
2025-04-01 21:16:17 +00:00
committed by Git OBS Bridge
commit 76b1455620
7 changed files with 212 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

1
baselibs.conf Normal file
View File

@@ -0,0 +1 @@
libhtscodecs2

3
htscodecs-1.6.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b4abb6dfa192f179386c1d49256892a134297ecb4dd25ad4c346e9dde1108c0
size 3715332

3
htscodecs-1.6.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5821b171c9ba5d2a616cedc98db9f4cc8b384fd5efd55a5a0935528646122659
size 3715406

97
htscodecs.changes Normal file
View File

@@ -0,0 +1,97 @@
-------------------------------------------------------------------
Fri Mar 28 10:35:16 UTC 2025 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to 1.6.1:
* Changes
+ Improve warning levels by the compiler in CI.
+ Switch to GitHub actions for some CI builds.
+ Add configure check for cpuid systems.
* Bug fixes
+ Use unsigned chars for ctype macros in the name tokeniser.
On many systems this was already mitigated against, but on
some OSes a char > 128 could trigger a buffer underrun.
+ Improve AVX512 compiler support.
+ Fix -std=c99 -pendantic pedantry (#117)
-------------------------------------------------------------------
Wed Jan 3 01:32:19 UTC 2024 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to 1.6.0:
* Changes
+ Replaced the rANS codec SIMD gathers with simulated gathers
via scalar memory fetches. This helps AMD Zen4, but
importantly it also fixes a disastrous performance regression
caused by Intel's DownFall microcode fix.
+ There is an impact on pre-DownFall speeds, but we should
focus on patched CPUs as a priority.
+ A small speed up to the rans_F_to_s3 function used by
order-0 rans decode.
+ Small speed up to SIMD rans32x16 order-1 encoder by reducing
cache misses. Also sped up the rans4x8 order-1 encoder,
particularly on AMD Zen4.
+ Now supports building with "zig cc"
* Bug fixes
+ Improve robustness of name tokeniser when given non 7-bit
ASCII and on machines where "char" defaults to unsigned.
+ Also fixed a 1 byte buffer read-overrun in name tokeniser.
+ Fix name tokeniser encoder failure with some duplicated
streams.
+ Fixed rans_set_cpu to work multiple times, as well as
reinstating the ability to change decode and encode side
independently (accidentally lost in commit 958032c). No
effect on usage, but it improves the test coverage.
+ Added a round-trip fuzz tester to test the ability to
encode. The old fuzz testing was decode streams only.
+ Fixed bounds checking in rans_uncompress_O0_32x16_avx2,
fixing buffer read overruns.
+ Removed undefined behaviour in transpose_and_copy(),
fixing zig cc builds.
-------------------------------------------------------------------
Thu May 4 14:47:16 UTC 2023 - Andrea Manzini <andrea.manzini@suse.com>
- Update to 1.5.0:
* Significant speed ups to the fqzcomp codec via code restructuring
and use of memory prefetch instructions. Encode is 30-40% faster
and decode 5-8% faster.
* Remove unused ax_with_libdeflate.m4 file from build system
- removed patch fix_ix86_build.patch already merged in upstream
- Update to 1.4.0:
* This is almost entirely minor bug fixing with a few small updates.
* Optimise compression / speed of the name tokeniser
* Improvements for Intel -m32 builds, including better AVX2 validation
* Detect Neon capability at runtime via operating system APIs.
* Update hts_pack to operate in line with CRAMcodecs spec, where the number of symbols > 16.
* Fixed too-stringent buffer overflow checking in O1 rans decoder.
-------------------------------------------------------------------
Thu Sep 8 21:52:47 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to 1.3.0:
* The primary change in this release is a new SIMD enabled
rANS codec.
There is a 32-way unrolled rANS implementation. This is accessed
using the existing rans 4x16 API with the RANS_ORDER_X32 bit set.
* Improved memory allocation via a new htscodecs_tls_alloc function.
* Some external functions have been renamed, with the old ones
still existing in a deprecated fashion.
* Improved test framework with an "entropy" tool that iterates
over all entropy encoders.
* Reworked fuzzing infrastructure.
* Small speed improvements to various rANS encoders and decoders.
* Substantial memory reduction to the name tokeniser (tok3).
* Fixed undefined behaviour in our use of _builtin_clz().
* Fixed a few redundant #includes.
* Work around strict aliasing bugs, uncovered with gcc -O2.
* Fixed an issue with encoding data blocks close to 2GB in size.
* Fix encode error with large blocks using RANS_ORDER_STRIPE.
- Add fix_ix86_build.patch
-------------------------------------------------------------------
Wed Apr 20 19:45:48 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
- Created initial package for libhts

84
htscodecs.spec Normal file
View File

@@ -0,0 +1,84 @@
#
# spec file for package htscodecs
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sonum 2
Name: htscodecs
Version: 1.6.1
Release: 0
Summary: C library for custom compression for CRAM and other formats
License: MIT
Group: Productivity/Scientific/Other
URL: https://github.com/samtools/htscodecs
Source0: https://github.com/samtools/htscodecs/releases/download/v%{version}/htscodecs-%{version}.tar.gz
Source100: baselibs.conf
BuildRequires: autoconf
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(zlib)
%description
htscodecs provides an API to access CRAM codecs used for "EXTERNAL" block types.
These consist of two variants of the rANS codec (8-bit and 16-bit renormalisation,
with run-length encoding and bit-packing also supported in the latter),
a dynamic arithmetic coder, and custom codecs for name/ID compression
and quality score compression derived from fqzcomp.
%package -n lib%{name}%{sonum}
Summary: C library for custom compression for CRAM and other formats
Group: System/Libraries
%description -n lib%{name}%{sonum}
htscodecs provides an API to access CRAM codecs used for "EXTERNAL" block types.
These consist of two variants of the rANS codec (8-bit and 16-bit renormalisation,
with run-length encoding and bit-packing also supported in the latter),
a dynamic arithmetic coder, and custom codecs for name/ID compression
and quality score compression derived from fqzcomp.
%package devel
Summary: Header files and libraries for compiling against %{name}
Group: Development/Libraries/C and C++
Requires: lib%{name}%{sonum} = %{version}
%description devel
Header files and libraries of the samtools project for compiling against %{name}.
%prep
%autosetup -p1
%build
%configure --disable-static
%make_build
%install
%make_install
rm %{buildroot}%{_libdir}/lib%{name}.la
%post -n lib%{name}%{sonum} -p /sbin/ldconfig
%postun -n lib%{name}%{sonum} -p /sbin/ldconfig
%files -n lib%{name}%{sonum}
%license LICENSE.md
%{_libdir}/lib%{name}.so.*
%files devel
%doc README.md NEWS.md
%{_includedir}/htscodecs
%{_libdir}/lib%{name}.so
%changelog