Shortest way to represent this variable code to symbol mapping?
- From: digiology@xxxxxxxxx
- Date: 31 May 2007 13:55:49 -0700
Hi, I have a message format in which there are 8 possible symbol in
which the distribution in not uniform. A message will typically
contain between 40 and 100 of these 8 possible symbols and the
messages must be made as small as possible.
So if 3 bits were assigned to each symbol a message could be between
120 and 300 bits long. I want to store a mapping of variable length
codes to symbols such as
A 0
B 10
C 111
D 110
E 1101
F 11101
G 111101
H 1111001
Where A is the most frequent symbol in the message, B the next most
probable ect.
The question is, how would I store this mapping using as little data
as possible? My first guess is to have a predetermined set of variable
length codes at both sending and receiving end and only store a list
of symbols ordered by frequency giving 3 bits to each. So in theis
example the header would contain : ABCDEFG (H could be left out as its
the only one left) which would require 7*3 = 21 bits.
This may not result in the best set of variable length codes
however .
Any thoughts?
.
- Prev by Date: Re: Compressing List of Tuples
- Previous by thread: Algorithm to select weights on a weighted sum?
- Index(es):
Relevant Pages
|