Containers-BTree

Description

A BTree, a ternary search tree and tree-based sets for Pharo (originally SqueakSource BTree by Avi Bryant et al.)

Details

Source
GitHub
Dialect
pharo (65% confidence)
License
MIT
Created
Nov. 29, 2026
Updated
Nov. 29, 2026
Topics
collections data-structures pharo smalltalk

README excerpt

# Containers-BTree

[![CI](https://github.com/pharo-containers/Containers-BTree/actions/workflows/CI.yml/badge.svg)](https://github.com/pharo-containers/Containers-BTree/actions/workflows/CI.yml)
![Pharo](https://img.shields.io/badge/Pharo-13%20%7C%2014%20%7C%2015-blue)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

Tree-based collections for Pharo:

- `CTBTree`: a B-tree, a balanced tree keeping its keys sorted, with fast lookup, insertion and range enumeration.
- `CTTSTree`: a ternary search tree for string keys, with prefix and approximate (fuzzy) matching.
- `CTTreeSet` and `CTDateTree`: a sorted set and a date-indexed tree built on `CTBTree`.

This package is part of the [Pharo Containers](https://github.com/pharo-containers) project, which collects, cleans,
tests and documents alternate collection data structures. Each package is modular, so users load only the collection they need.

## Installation

```Smalltalk
Metacello new
  baseline: 'ContainersBTree';
  repository: 'github://pharo-containers/Containers-BTree:v2.0.0/';
  load.
```

## How to depend on it?

If you want to add a dependency on Containers-BTree to your project, include the following lines into your baseline:

```Smalltalk
spec
  baseline: 'ContainersBTree'
  with: [ spec repository: 'github://pharo-containers/Containers-BTree:v2.0.0/' ].
```

To read more about baselines and Metacello, check out the [Baselines](https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/Baselines.md) article on the [Pharo Wiki](https://github.com/pharo-open-documentation/pharo-wiki).

## Credits

Original implementation by Avi Bryant ([SqueakSource BTree](http://www.squeaksource.com/BTree/), 2005), with Adrian Lienhard, Lukas Renggli and Ramon Leon.
Imported to GitHub by Sebastian Sastre in 2021 (now [OldBTree](https://github.com/pharo-containers/OldBTree), which keeps that history), then renamed to the pharo-containers conventions.
← Back to results