arXiv Science⌕ Search

arXiv subjects

Kamila Szewczyk

Publications and source records attributed to Kamila Szewczyk.

5 recordsLinked to original sources

MKC: Exact k-mer Counting into a Compact Cache-Line Cuckoo Index

Querying the counts of individual k-mers is an essential step of assembly evaluation and metagenomic classification. Disk-based counters such as KMC 3 count in bounded memory but write sorted lists that are slow to query, whereas hash-based counters such as Hackgap hold large in-memory tables for all distinct k-mers. In this paper, we propose an exact canonical k-mer counter called MKC for k <= 32, which builds a static hash table of counts in the manner of a disk-based counter. MKC distributes the k-mers into bins by minimizer and counts each bin by sorting the hashes of its k-mers in cache. Subsequently, it assembles a two-choice cuckoo table of 64-byte buckets, in which each record stores a quotient of an invertible hash and a count field of variable width, and buckets of mostly unique k-mers store their quotients via Elias-Fano coding. We apply MKC on ten genomes and read sets. The results show that the index of a human genome takes 37.4-42.5 bits per distinct 31-mer, counts included, and that most lookups read one cache line. With 16 threads, MKC builds its index 1.6-8.0 times faster than KMC 3 and 5.6-42.4 times faster than Hackgap, indexes a human genome in 8.9 s with a peak resident set size of 1.0 GiB, and writes the smallest index of the compared counters. At equal page size, it answers random queries 5.0-11.7 times faster than KMC 3 and 1.8-3.3 times faster than Hackgap. For k-mers in sequence order, its batch interface is 1.6-8.5 times faster than Hackgap.

cs.DS↗

Lossless Re-Encoding of Vorbis and Opus Audio Files

We present Balrogg, a lossless recompressor that replaces the entropy coding of Ogg Vorbis and Ogg Opus files with adaptive context mixing models. For Vorbis, we write each represent each codebook entry as a tuple of small signed integers (digits), binarized in five stages, and mixed with a direct context model, a bit-history model, and a match model, with weights selected by the neighboring digits and the previous residue pass. For Opus, each symbol is coded by an adaptive context model initialized with the codec's probability tables as priors, and the pyramid vector quantizer (PVQ) indices of the CELT layer are split recursively into pulse counts. At the default level, Balrogg reduces Vorbis music by 16.2\%, Vorbis speech by 10.6%, and Opus speech by 5.4%; xz, zstd, ZPAQ, and bzip3 save at most 4.1% on the same files. Over 48 encoder configurations, files shrink to 66.5--96.1% of their size. Encoding and decoding are symmetric, run at 1.8--3.2~MB/s per core, and use less than 12~MiB of memory.

cs.SD↗

A Gallager-Type Redundancy Bound for Binary Fano Coding

Binary Fano codes build a complete prefix code by repeatedly splitting the sorted list of symbol probabilities into two halves whose total probabilities are as close to each other as possible. Krajči, Liu, Mikeš, and Moser proved in 2015 that the redundancy $R$ of this code satisfies $R\le1-p_n$, where $p_n$ is the smallest symbol probability. We prove that $R<U(p_1)$, where $U$ is a piecewise function of the largest symbol probability $p_1$ with $U<1$. In particular, $R<p_1+4-\tfrac53\log_2 5$ for every source, and $R<\tfrac52-\tfrac56\log_2 5$ when $p_1<\tfrac12$. The bound equals the supremum of the redundancy for $p_1\ge\tfrac12$ and on an interval just below $\tfrac13$, and we give a lower bound for the other values of $p_1$. Unlike the bounds for Huffman codes, the proofs do not use the sibling property. They work directly with the Fano split rule, mainly through the facts that every split is nearly balanced and that the redundancy is a sum of one term per internal node of the tree.

cs.IT↗

Linear KL-Optimal Frequency Normalisation

Fast implementations of range coding and asymmetric numeral systems (ANS) owe their excellent performance to replacing slow division instructions by bit-shifts in their encoding and decoding algorithms. This is possible when the frequency distribution of symbols is normalised such that it sums to a power of two. However, such normalisation typically introduces a marginal increase in the Kullback-Leibler divergence between the original and the normalised distribution, leading to a worse compression ratio. We show that the currently used methods for frequency normalisation are suboptimal in both their running time and the achieved Kullback-Leibler divergence. We propose a new method for frequency normalisation that is asymptotically linear in the number of symbols and achieves the smallest possible Kullback-Leibler divergence between the original and the normalised distribution. The method is based on a solution to a separable concave optimisation problem, which may be of independent interest.

cs.IT↗

Hecate: A Modular Genomic Compressor

We present Hecate, a modular lossless genomic compression framework. It is designed around uncommon but practical source-coding choices. Unlike many single-method compressors, Hecate treats compression as a conditional coding problem over coupled FASTA/FASTQ streams (control, headers, nucleotides, case, quality, extras). It uses per-stream codecs under a shared indexed block container. Codecs include alphabet-aware packing with an explicit side channel for out-of-alphabet residues, an auxiliary-index Burrows-Wheeler pipeline with custom arithmetic coding, and a blockwise Markov mixture coder with explicit model-competition signaling. This architecture yields high throughput, exact random-access slicing, and referential mode through streamwise binary differencing. In a comprehensive benchmark suite, Hecate provides the best compression vs. speed trade-offs against state-of-the-art established tools (MFCompress, NAF, bzip3, AGC), with notably stronger behaviour on large genomes and high-similarity referential settings. For the same compression ratio, Hecate is 2 to 10 times faster. When given the same time budget as other algorithms, Hecate achieves up to 5% to 10% better compression.

cs.DS↗