+sub zpl_compress {
+ my $compress = shift;
+ my $repeat = length($compress);
+ my $out;
+ while ( $repeat >= 400 ) {
+ $out .= 'z';
+ $repeat -= 400;
+ }
+ if ( $repeat >= 20 ) {
+ $out .= chr( ord('f') + ( $repeat / 20 ) );
+ $repeat %= 20;
+ }
+ if ( $repeat > 0 ) {
+ $out .= chr( ord('F') + $repeat );
+ }
+ $out .= substr($compress,0,1); # char
+ warn "## zpl_compress $repeat = $compress -> $out\n";
+ return $out;
+}
+