Skip to content

Huffman Tree generation, encoding and decoding, in Scheme

License

Notifications You must be signed in to change notification settings

xlxs4/sicp-huffman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sicp-huffman

(define sample-tree
  (generate-huffman-tree
   '((a 5) (b 2) (r 2) (c 1) (d 1))))

(define sample-message
  '(a b r a c a d a b r a))

(decode (encode sample-message sample-tree) sample-tree)

;; > (a b r a c a d a b r a)

About

Huffman Tree generation, encoding and decoding, in Scheme

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages