Jump to content
  • Advertisement
Sign in to follow this  

What is basic encoding called?

This topic is 2781 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I understand Huffman Coding.

I was wondering what it's called when you do it in a more primitive sense.

For example, if you have a string that contains 2^n < x <= 2^(n+1) characters and therefore could do a straight fixed length (n+1)-bit encoding of each character.

Is there a name for this type of coding? It seems so simple it might not even have a name. I know ASCII is an example of it though. (fixed length = 8)


string = "hello world"

h, e, l, o, ' ', w, r, d = 8 characters, so n = 3 and we could represent them as follows:
h = 000
e = 001
l = 010
o = 011
' ' = 100
w = 101
r = 110
d = 111

And now instead of taking up 88 bits for this 11 character string, it would only require 33 bits (plus the table of course, which in this limited example defeats the purpose) ((whereas huffman would require only 29 bits + table))

Is there a name for this?

Share this post

Link to post
Share on other sites
Serialization? Tokenization?

All you've done is made a token table or data dictionary with 8 members, not much of a fancy name for it beyond that.

Many compression techniques focus on generating the best token tables for their data. Then they use Huffman encoding into that table.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!