logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [Boston.pm] bit packing?: msg#00019

Subject: Re: [Boston.pm] bit packing?
>>>>> "SAJ" == Stephen A Jarjoura 
>>>>> <runester-ur4TIblo6goN+BqQ9rBEUg@xxxxxxxxxxxxxxxx> writes:

  SAJ> I have recently needed to store data in a binary format, and
  SAJ> spent quite some time trying to find a way to pack and unpack
  SAJ> with the pack() and unpack() functions. In the end, I found a way
  SAJ> to do what I needed with vec(). The only reason that was possible
  SAJ> was because I was storing/retrieving nybbles and bytes, since
  SAJ> vec() only works on a power of two number of bits. But, what if I
  SAJ> had needed to store/retrieve some arbitrary number of bits?
 
cpan is your friend. look for Bit::Vector. everything you ever wanted to
do with bits.

uri

-- 
Uri Guttman  ------  uri-X/06uaNR9nFmbZtjAW+qKA@xxxxxxxxxxxxxxxx  -------- 
http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>