Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 rifling through the Monastery: (17)
As of 2015-07-28 19:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls