Help for this page

Select Code to Download


  1. or download this
    1 byte:                       0..127
    2 bytes:                    128..etc
    ...
    7 bytes:      4_398_046_511_104
    8 bytes:    562_949_953_421_312
    9 bytes: 72_057_594_037_927_936
    
  2. or download this
    sub compress_uint {
       my ($uint) = @_;
    ...
    for (100, 1000, 100000) {
       print $fh compress_uint($_);
    }
    
  3. or download this
    sub decompress_uint {
       our $compressed; local *compressed = \($_[0]);
    ...
    while (length($raw)) {
       push @nums, decompress_uint($raw);
    }