4 added 242 characters in body
source | link
  • Write an encoder and a decoder in any language of your choice
  • The encoder's input is a list of code points (as integers) and it outputs a list of bytes (as integers) corresponding to your encoding.
  • The decoder does the opposite (bytes => code points)
  • Your implementation has to cover all Unicode 7.0.0 assigned code points
  • It has to stay backwards-compatible with ASCII, i.e. encode Basic latin characters (U+0000-U+007F) on one byte, with 0 as most significant bit.
  • Encode all the other assigned code points in any form and any number of bytes you want, as long as there is no ambiguity (i.e. two code points or group of code points can't have the same encoding and vice versa)
  • Your implementation doesn't have to cover UTF-16 surrogates (code points U+D800-U+DFFF) nor private use areas (U+E000-U+F8FF, U+F0000-U+10FFFF)
  • Your encoding must be context-independant (i.e. not rely on previously encoded characters) and does NOT require self-synchronization (i.e. each byte doesn't have to infer where it's located in the encoding of a code point, like in UTF-8).

Total: 113116,706816 code points.

Your score is not the size of your encoder/decoder, but the number of bytes that your encoder outputs when you feed it with all the 113116,706816 possible code points (in one time or separately).

  • Write an encoder and a decoder in any language of your choice
  • The encoder's input is a list of code points (as integers) and it outputs a list of bytes (as integers) corresponding to your encoding.
  • The decoder does the opposite (bytes => code points)
  • Your implementation has to cover all Unicode 7.0.0 assigned code points
  • It has to stay backwards-compatible with ASCII, i.e. encode Basic latin characters (U+0000-U+007F) on one byte, with 0 as most significant bit.
  • Encode all the other assigned code points in any form and any number of bytes you want, as long as there is no ambiguity (i.e. two code points or group of code points can't have the same encoding and vice versa)
  • Your implementation doesn't have to cover UTF-16 surrogates (code points U+D800-U+DFFF) nor private use areas (U+E000-U+F8FF, U+F0000-U+10FFFF)

Total: 113,706 code points.

Your score is not the size of your encoder/decoder, but the number of bytes that your encoder outputs when you feed it with all the 113,706 possible code points (in one time or separately).

  • Write an encoder and a decoder in any language of your choice
  • The encoder's input is a list of code points (as integers) and it outputs a list of bytes (as integers) corresponding to your encoding.
  • The decoder does the opposite (bytes => code points)
  • Your implementation has to cover all Unicode 7.0.0 assigned code points
  • It has to stay backwards-compatible with ASCII, i.e. encode Basic latin characters (U+0000-U+007F) on one byte, with 0 as most significant bit.
  • Encode all the other assigned code points in any form and any number of bytes you want, as long as there is no ambiguity (i.e. two code points or group of code points can't have the same encoding and vice versa)
  • Your implementation doesn't have to cover UTF-16 surrogates (code points U+D800-U+DFFF) nor private use areas (U+E000-U+F8FF, U+F0000-U+10FFFF)
  • Your encoding must be context-independant (i.e. not rely on previously encoded characters) and does NOT require self-synchronization (i.e. each byte doesn't have to infer where it's located in the encoding of a code point, like in UTF-8).

Total: 116,816 code points.

Your score is not the size of your encoder/decoder, but the number of bytes that your encoder outputs when you feed it with all the 116,816 possible code points (in one time or separately).

3 added 113 characters in body
source | link

Winner

The most efficient encoding will win and will be the subject of a future code-golf challenge ;)

Winner

The most efficient encoding will win and will be the subject of a future code-golf challenge ;)

    Tweeted twitter.com/#!/StackCodeGolf/status/527004822411571200
2 edited tags
| link
1
source | link