From e2b0f2ba407c0e960e04b816c4c2eca6d41c76c8 Mon Sep 17 00:00:00 2001 From: nwf Date: Fri, 29 Aug 2008 16:08:58 -0400 Subject: [PATCH] Update Definitions to base five edition darcs-hash:20080829200858-4d648-df97c3c1411eea0d7f0501a8e090d90bfdc066b2.gz --- Definitions.pm | 92 +++++++++++++------------------------------------- 1 file changed, 24 insertions(+), 68 deletions(-) diff --git a/Definitions.pm b/Definitions.pm index 6c639e3..125f036 100644 --- a/Definitions.pm +++ b/Definitions.pm @@ -10,9 +10,8 @@ require Exporter; @EXPORT_OK = qw( %known_types $MESSAGE_START $MESSAGE_END - @default_code_chars - @debug_code_chars - $instance_huffman_table1 + @default_code_chars @debug_code_chars + $instance_huffman_table1 $instance_suffix ); ################################################################# @@ -20,84 +19,41 @@ require Exporter; # us so that we can see them when we switch to using debug code # sets. Somewhat cheesy, I suppose, but nevertheless handy. -our $MESSAGE_START = 21; # Encodes as ^O^O using default_code_chars -our $MESSAGE_END = 3; # Encodes as ^O using default_code_chars +our $MESSAGE_START = 12; # Encodes as ^O^O using default_code_chars +our $MESSAGE_END = 2; # Encodes as ^O using default_code_chars ################################################################# -our @default_code_chars = ("", "", "", "", "", ""); -our @debug_code_chars = ("B", "C", "G", "O", "V", "_"); +our @default_code_chars = ("", "", "", "", ""); +our @debug_code_chars = ("B", "C", "O", "V", "_"); ################################################################# + # This assigns canonical names to the T-encoded type tags. + # The range 0 to 4 is RESERVED FOR PROTOCOL EXTENSIONS + # The range 7 to 19 is RESERVED FOR GLOBAL ASSIGNMENT + # The range 20 to 25 is RESERVED FOR EXPERIMENTS our %known_types = ( - 'InstanceLabelHuffman1' => 0x6, - 'InstanceContinuationMessage' => 0x7, + 'InstanceLabelHuffman1' => 0x5, + 'InstanceContinuationMessage' => 0x6, ); ################################################################# -### This is a 6-ary tree, ideally of the Huffman variety. -### Note that for convenience, plies of single characters may be -### represented as strings. Plies of larger varieties need to -### be represented as array references. - -#my $decode_table = [ -# "abcdef", -# "ghijkl", -# "mnopqr", -# "stuvwx", -# [ "y", -# "z", -# "-", -# "_", -# ".+=&\@!", -# "*^/\$#?" ], -# [ "ABCDEF", -# "GHIJKL", -# "MNOPQR", -# "STUVWX", -# "YZ1234", -# "567890"] ]; - -### The following version is determined by Smaug (and nwf) by -### Ensuring one count -### /usr/share/dict/** filtered -### /usr/share/doc/* filtered -### -### In particular, by... -### -### LIST='abcdefghijklmnopqrstuvwxyz'\ -### 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'\ -### '_.+=&@!*^\$#?-' -### (echo $LIST; find /usr/share/dict /usr/share/doc -type f -exec cat {} \;\ -### | LC_ALL="C" sed -e s/[^$LIST]//g ) | perl ./huffgen.pl -### -### It was subsequently slightly re-arranged to take advantage of the -### shorter encodings available in gwillen's storage here. - our $instance_huffman_table1 = [ - "staelr", - "0yfb.g", - "ESAvT-", - "=umhdp", - [ - "c", - "o", - "i", - "n", - "M#854H", - "P&Bx3N", - ], - [ - "UjG796", - "FO2kLI", - "C_1wDR", - "^Q+@?Z", - "JK!\\\$V", - "XYzW*q", - ], + "rsoit", # 2 per + "gb<>-", + "mane.", + [ "Ch()=", "U\@HG#", "&j+NB", "MFL;:", "^~Q?Z" ], + [ "'ufp/", "ldcv_" , "STARE", + [ "I" , "O" , "wWkqx", "DPyXY", "KVJz\"" ], + [ "01234", "56789", "%*,|!", "`\$\\{}", "[]" ] #Note three more symbols + #are possible in the last + #position here... + ] ]; +our $instance_suffix = " `"; + ################################################################# 1; -- 2.50.1