I'm going to pretend for a second that you're in control of the conversion program, or that the conversion program is a well-thought-out program.

In the ideal world, you'd simply extend the pipe:

open my $fh, "gunzip -c $filename | convert_to_text - |";

Thus, gunzip would uncompress as much as it could before getting blocked on a pipe to convert_to_text which would read the binary from stdin, and write the text to stdout, both of which would block when empty/full, respectively, and your script could deal with the text on the way through.

Back to reality ... in the more common case, I see nothing wrong with ramfs - as long as it works and doesn't corrupt your data, same as any other filesystem. You just have to be careful that you're not wasting ram on stuff that could make your system faster in other ways. For example, if that ram were instead used for physical filesystem caching, you'd get almost the same effect, and ram that wasn't in use for caching (vs ramfs) could still be used for your programs.


In reply to Re^3: Using ramfs to process files by Tanktalus
in thread Using ramfs to process files by jalewis2

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.