A general minimum-redundancy source-coding algorithm | Synapse