Skip to content

Instantly share code, notes, and snippets.

@shrdlu68
Created September 12, 2018 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrdlu68/6a4e624f3562c2bb81474827bb59edd3 to your computer and use it in GitHub Desktop.
Save shrdlu68/6a4e624f3562c2bb81474827bb59edd3 to your computer and use it in GitHub Desktop.
ARITHMETIC-CODING> (defparameter foo (make-bit-trie :content 0))
FOO
ARITHMETIC-CODING> foo
#S(BIT-TRIE
:CONTENT 0
:CHILDREN #(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL))
ARITHMETIC-CODING> (setf (at-bit-trie foo 83 62) "Hello")
NIL
ARITHMETIC-CODING> foo
#S(BIT-TRIE
:CONTENT 0
:CHILDREN #(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL
#S(BIT-TRIE
:CONTENT NIL
:CHILDREN #(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL))
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL))
ARITHMETIC-CODING>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment