Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
-- Can you please provide an example of relevant data and the relevant output you expect from that data?

You want me to post a 31,156,327 byte bit-vector that represents just under a quarter of a billion boolean states?

The vector is just a string of bits. Packing a integer to provide a sample was convenient. The ordering of the bits was irrelevant.

The important factor was showing how the rle was to be encoded. -- Can you say why vec must be used?

Pack (or any other means) is fine for the rle, but the original vector is built with vec() so the appropriate pack template for accessing the bits in the same order as they were constructed is 'b*'.

The downside of using unpack 'b*' during the rle, is it expands the 31MB vector to a 250 MB string.

On the other hand, vec() can process the 31MB without expanding it at all.


In reply to Re^4: Run length encode a bit vector by Anonymous Monk
in thread Run length encode a bit vector by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-25 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found