# attractivechaos/klib

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/attractivechaos-klib).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,679 stars · 588 forks · C · MIT

## Links

- GitHub: https://github.com/attractivechaos/klib
- Homepage: http://attractivechaos.github.io/klib/
- awesome-repositories: https://awesome-repositories.com/repository/attractivechaos-klib.md

## Description

klib is a comprehensive C standard library extension and data structure toolkit. It provides a set of fundamental tools for memory management, data organization, and general-purpose utility functions for standalone C applications.

The project features specialized capabilities for bioinformatics sequence analysis, including the parsing of FASTA, FASTQ, and Newick formats and the implementation of Smith-Waterman sequence alignment and Hidden Markov Models. It also includes a mathematical computation library for numerical routines and expression evaluation, as well as a lightweight HTTP and FTP client for random-access remote data retrieval.

The toolkit covers a broad surface of high-performance computing primitives, including multi-threading models, linear-time suffix array construction, and optimized sorting algorithms. It implements a variety of efficient data indexing structures such as hash tables with open addressing, B-trees, and intrusive AVL trees, supported by memory-pool-based sequence management.

Additional utilities include JSON data parsing and command-line argument interpretation.

## Tags

### Data & Databases

- [Sequence Analysis](https://awesome-repositories.com/f/data-databases/data-analysis-visualization/analytical-platforms-engines/sequence-analysis.md) — Provides tools for analyzing biological sequences, including FASTA/FASTQ parsing and Smith-Waterman alignment.
- [Bioinformatics Sequence Parsing](https://awesome-repositories.com/f/data-databases/bioinformatics-sequence-parsing.md) — Reads and processes specialized biological file formats, including FASTA and FASTQ, for genomic analysis. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Data Indexing Structures](https://awesome-repositories.com/f/data-databases/data-indexing-structures.md) — Organizes information using hash tables, B-trees, and AVL trees for high-performance lookups.
- [Key-Value Pair Managers](https://awesome-repositories.com/f/data-databases/key-value-pair-managers.md) — Provides efficient key-value storage and retrieval using hash tables with open-addressing collision resolution. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Mathematical Evaluators](https://awesome-repositories.com/f/data-databases/expression-engines/mathematical-evaluators.md) — Includes logic to parse and evaluate mathematical formula strings into numerical results. ([source](http://attractivechaos.github.io/klib/))
- [Newick Format Parsing](https://awesome-repositories.com/f/data-databases/newick-format-parsing.md) — Converts Newick tree format text into structured data for biological and hierarchical analysis. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Collection Sorting](https://awesome-repositories.com/f/data-databases/query-sorting/query-filters/collection-based-filtering/collection-sorting.md) — Implements high-performance collection sorting using a hybrid introsort algorithm to ensure linearithmic time complexity.

### Part of an Awesome List

- [Bioinformatics Sequence Analysis Libraries](https://awesome-repositories.com/f/awesome-lists/data/bioinformatics-sequence-analysis-libraries.md) — Provides a specialized set of tools for parsing biological formats and performing sequence alignment.
- [Sequence Alignment](https://awesome-repositories.com/f/awesome-lists/data/sequence-alignment.md) — Implements the Smith-Waterman algorithm to perform local sequence alignment for biological data comparison. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Striped Smith-Waterman Alignment](https://awesome-repositories.com/f/awesome-lists/data/sequence-alignment/striped-smith-waterman-alignment.md) — Performs high-performance local sequence alignment using the Striped Smith-Waterman algorithm for genomic data comparison.
- [Build Systems](https://awesome-repositories.com/f/awesome-lists/devtools/build-systems.md) — A small, lightweight implementation of common algorithms.
- [General Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/general-utilities.md) — Lightweight implementations of common algorithms and structures.

### Education & Learning Resources

- [Intrusive AVL Trees](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/data-structure-implementations/data-structures/balanced-search-trees/avl-tree-operations/intrusive-avl-trees.md) — Provides memory-efficient intrusive AVL tree structures for managing sorted hierarchies without additional allocations.
- [Tree Data Structures](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/technical-academic-domains/algorithmic-design-analysis/tree-data-structures.md) — Provides B-trees and AVL trees to organize data hierarchically for efficient searching and range queries. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Search Tree Implementations](https://awesome-repositories.com/f/education-learning-resources/tree-data-structures/search-tree-implementations.md) — Implements balanced search trees, including B-trees and intrusive AVL trees, to enable efficient data lookup. ([source](http://attractivechaos.github.io/klib/))

### Operating Systems & Systems Programming

- [C Data Structure Libraries](https://awesome-repositories.com/f/operating-systems-systems-programming/c-data-structure-libraries.md) — Provides low-level C implementations of fundamental data structures including hash tables, B-trees, and AVL trees.
- [C Libraries](https://awesome-repositories.com/f/operating-systems-systems-programming/c-libraries.md) — Serves as a portable C library extension providing general-purpose data structures and utility functions.
- [C Memory Management](https://awesome-repositories.com/f/operating-systems-systems-programming/c-memory-management.md) — Handles low-level allocation and cleanup of memory buffers using custom memory pools and dynamic arrays.
- [Pool Allocators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/custom-memory-allocators/memory-object-pools/pool-allocators.md) — Utilizes pool allocators to manage contiguous memory blocks for linked lists and queues, reducing fragmentation.
- [Linked List Implementations](https://awesome-repositories.com/f/operating-systems-systems-programming/linked-list-implementations.md) — Implements efficient single-linked lists integrated with memory pools for low-level data organization. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))

### Programming Languages & Runtimes

- [C Runtime Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/c-common-utility-libraries/c-runtime-utilities.md) — Supplies a comprehensive suite of C runtime utilities for JSON parsing, CLI argument handling, and math evaluation.
- [Dynamic Sequence Management](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-sequence-management.md) — Organizes data using a combination of dynamic arrays, double-ended queues, and linked lists supported by memory pools. ([source](http://attractivechaos.github.io/klib/))
- [Concurrent Thread Execution](https://awesome-repositories.com/f/programming-languages-runtimes/concurrent-thread-execution.md) — Implements multi-threading models to enable parallel task processing and increase overall throughput. ([source](http://attractivechaos.github.io/klib/))

### Scientific & Mathematical Computing

- [C Numerical Libraries](https://awesome-repositories.com/f/scientific-mathematical-computing/mathematical-computing-libraries/c-numerical-libraries.md) — Implements numerical routines, nonlinear programming, and random number generation in C.
- [High-Performance Computing](https://awesome-repositories.com/f/scientific-mathematical-computing/high-performance-execution-environments/high-performance-and-parallel-computing/high-performance-computing.md) — Implements multi-threading models and optimized sorting algorithms to increase processing speed for large datasets.
- [Numerical Computation Routines](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-computation-routines.md) — Executes numerical routines including nonlinear programming and pseudorandom number generation. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Recursive Descent Evaluators](https://awesome-repositories.com/f/scientific-mathematical-computing/recursive-tree-traversal-algorithms/expression-tree-evaluators/recursive-descent-evaluators.md) — Implements a recursive-descent evaluator to parse and compute results from mathematical formula strings.

### Software Engineering & Architecture

- [Dynamic Arrays](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-arrays.md) — Implements resizable dynamic arrays that automatically manage contiguous memory blocks for element storage. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))
- [Open Addressing Implementations](https://awesome-repositories.com/f/software-engineering-architecture/hash-tables/open-addressing-implementations.md) — Implements hash tables using open addressing and probing techniques for efficient key-value storage.
- [Suffix Array Construction](https://awesome-repositories.com/f/software-engineering-architecture/string-processing-algorithms/suffix-array-construction.md) — Implements the SAIS algorithm for linear-time construction of suffix arrays used in string indexing.

### Artificial Intelligence & ML

- [Hidden Markov Models](https://awesome-repositories.com/f/artificial-intelligence-ml/markov-state-transition-models/hidden-markov-models.md) — Provides Hidden Markov Model implementations for the analysis of probabilistic biological sequences. ([source](http://attractivechaos.github.io/klib/))

### Development Tools & Productivity

- [Remote File Reading](https://awesome-repositories.com/f/development-tools-productivity/remote-file-transfers/remote-file-reading.md) — Enables reading specific byte ranges from remote HTTP or FTP servers using random access. ([source](https://cdn.jsdelivr.net/gh/attractivechaos/klib@main/README.md))

### Networking & Communication

- [Random Access Remote Retrieval](https://awesome-repositories.com/f/networking-communication/random-access-remote-retrieval.md) — Provides a lightweight client for random-access retrieval of specific data segments from HTTP and FTP servers.
- [Remote Data Retrieval Libraries](https://awesome-repositories.com/f/networking-communication/remote-data-retrieval-libraries.md) — Implements a lightweight client for random-access data retrieval from HTTP and FTP servers.
