lobif is a CLI to store and retrieve files from pages in Jonathan Basile's Library of Babel.
A page in the Library of Babel contains 3200 characters, consisting of a-z, ., and ,.
Using the default Babel28 encoding method, 1920 bytes of data can be stored and retrieved from a page in the Library of Babel.
$ cat my_file
Hello, world!
This is my file.
$ lobif write my_file > addr.txt
$ lobif read addr.txt
Hello, world!
This is my file.
$ lobif page-get addr.txt
fsbskjnsecbkxyfkdowcbmpxgjbrznbktijbkurdbksipjnoyu..zd
$ lobif page-get addr.txt | lobif decode
Hello, world!
This is my file.
Written in C99 and complies with POSIX.1-2001 through to POSIX.1-2024.
$ lobif <operation> [-e <encoding>] [-o <path>] [<path>]
| Option | Description |
|---|---|
<path> |
Path to read operation input from. If path is - or not given, input will be read from stdin. |
-o <path> |
Path to write operation output to. If path is - or not given, output will be written to stdout. |
-e <encoding> |
Encoding method to use. Usable only by the write, read, encode, and decode operations. If not given, the Babel28 encoding method will be used. |
| Short name | Full name | Bytes per page | Description |
|---|---|---|---|
| bhex, b16 | BabelHex, Babel16 | 1600 | Hexadecimal using characters a-p instead of the conventional 0-f. Encodes each byte as 2 characters. |
| b28 | Babel28 | 1920 | Default encoding method. Based on Ascii85. Encodes blocks of 3 bytes as 5 characters using the ., ,, and a-z characters. |
The write operation:
- Encodes the given data (
<path>orstdin). - Locates the Library of Babel page whose contents matches the encoded data.
The operation outputs the address of the Library of Babel page where the encoded data can be found.
Warning
Input data that exceeds the Library of Babel page size (1920 bytes when using Babel28 encoding) will be silently truncated.
The read operation:
- Fetches the Library of Babel page at the given address (
<path>orstdin). - Decodes the data stored in the page's contents.
The operation outputs the data decoded from the fetched Library of Babel page.
The page-search operation locates the Library of Babel page whose contents matches the given text (<path> or stdin).
The operation is equivalent to step #2 of the write operation.
The operation outputs the address of the located Library of Babel page.
The page-get operation fetches the Library of Babel page at the given address (<path> or stdin).
The operation is equivalent to step #1 of the read operation.
The operation outputs the contents of the fetched the Library of Babel page.
The encode operation encodes the given data (<path> or stdin).
The operation is equivalent to step #1 of the write operation.
The operation outputs an encoded string.
The decode operation decodes data from the given string (<path> or stdin).
The operation is equivalent to step #2 of the read operation.
The operation outputs the decoded data.
Ensure the following is available on your system:
- GCC or clang. To use clang,
CC=clangmust be passed to make commands. - curl
Clone and build:
(Replace github.com with gitlab.com if using GitLab)
$ git clone https://github.com/n-ivkovic/lobif.git
$ cd lobif
$ make
Run:
$ ./lobif ...
Additional options:
$ make help
Please read CONTRIBUTING.md before making any contributions.
Copyright © 2026 Nicholas Ivkovic.
Licensed under the GNU General Public License version 3 or later. See LICENSE, or https://gnu.org/licenses/gpl.html if more recent, for details.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.