Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: pack/unpack 6-bit fields. (precision)

by tye (Cardinal)
on Aug 18, 2004 at 07:10 UTC ( #383881=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    bytes:  765432 10 7654 3210 76 543210
    fields: 543210 54 3210 5432 10 543210
    or
    bytes:  012345 67 0123 4567 01 234567
    fields: 012345 01 2345 0123 45 012345
    
  2. or download this
    my @fields=
         unpack "C*",    # 16 6-bit numeric values
    ...
         unpack "B6"x16, # 16 6-character base-2  strings
         pack   "C*",    # string of 16 bytes, each  holding a 6-bit value
         @fields;        # 16 6-bit numeric values
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://383881]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-08-21 06:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (128 votes), past polls