textproc/libxmlb 0.3.29nb1 NetBSD
Library to help create and query binary XML blobs
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- Last update
- Commit
7b5a3977f9- License
- gnu-lgpl-v2.1
- Categories
- textproc
- Package size
- 164.0 KiB, 928.0 KiB installed
Description
XML is slow to parse and strings inside the document cannot be memory mapped as they do not have a trailing NUL char. The libxmlb library takes XML source, and converts it to a structured binary representation with a deduplicated string table -- where the strings have the NULs included.
This allows an application to mmap the binary XML file, do an XPath query and return some strings without actually parsing the entire document. This is all done using (almost) zero allocations and no actual copying of the binary data.
As each node in the binary XML file encodes the 'next' node at the same level it makes skipping whole subtrees trivial. A 10Mb binary XML file can be loaded from disk *and* queried in less than a few milliseconds.
In the other systems
| System | Port | Version |
|---|---|---|
| NetBSD | textproc/libxmlb | 0.3.29nb1 |
| FreeBSD | textproc/libxmlb | 0.3.27 |
| OpenBSD | textproc/libxmlb | 0.3.29 |
| DragonFly | textproc/libxmlb | 0.3.22 |
| MidnightBSD | textproc/libxmlb | 0.3.27 |
Install
Binary package:
pkgin install libxmlb
From pkgsrc:
cd /usr/pkgsrc/textproc/libxmlb && make install clean