PHPackages                             desmx/sds-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. desmx/sds-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

desmx/sds-php
=============

A Succinct Trie for PHP

01PHPCI failing

Since Jan 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/desmx/sds-php)[ Packagist](https://packagist.org/packages/desmx/sds-php)[ RSS](/packages/desmx-sds-php/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

A Succinct Trie for PHP
=======================

[](#a-succinct-trie-for-php)

PHP Port of Steve Hanov JavaScript library released to the public domain.

The SDS library is designed to work with succinctly encoded trie structure. The trie is encoded to a succinct bit string using the method of Jacobson (1989).

The resulting trie does not have to be decoded to be used. Searching a word in the encoded data can be done in O(mlogn) time, where m is the number of symbols in the target word, and n is the number of nodes in the trie.

Installing SDS Trie
-------------------

[](#installing-sds-trie)

The recommended way to install SDS Trie is through [Composer](https://getcomposer.org/).

```
composer require desmx/sds-php
```

Quick usage
-----------

[](#quick-usage)

Suppose we have encoded JSON data:

```
{
    "nodeCount": 27,
	"directory": "Bs",
	"trie": "v___8AAAAfwQxRySzT0U1V2W3X4Y5Z6a7b8cg",
	"t1size": 1024,
	"t2size": 32
}
```

We can create succint trie from given json data.

```
