<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yes, plus some random constant amount of memory for internal bookkeeping.<div class=""><br class=""></div><div class="">christos<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 20, 2022, at 3:59 PM, Arif Driessen <<a href="mailto:arifd86@gmail.com" class="">arifd86@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p class=""><defanged_div dir="auto" class=""></defanged_div></p><p class=""><defanged_div class="">Hi Christos,</defanged_div></p><defanged_div class=""><p class=""><defanged_div dir="auto" class=""><br class=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div dir="auto" class="">thanks for the reply. This sounds like great news! But can i just confirm my understanding, so with no changes to the default, if i pipe a 180GiB zip file into it, at max only 7M of RAM will be allocated?<br class=""><br class=""></defanged_div></p><p class=""><defanged_div class="gmail_quote" dir="auto"></defanged_div></p><p class=""><defanged_div dir="ltr" class="gmail_attr">On Thu, 20 Oct 2022, 15:20 Christos Zoulas, <<a href="mailto:christos@zoulas.com" class="">christos@zoulas.com</a>> wrote:<br class=""></defanged_div></p><defanged_div class=""><blockquote class="gmail_quote" defanged_style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p class=""><defanged_div style="word-wrap:break-word;line-break:after-white-space" class="">It will generally allocate and read only up to bytes_max which defaults to 7M and can be set by -P bytes=</defanged_div></p><p class=""><defanged_div class=""><br class=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">Best,</defanged_div></p><defanged_div class=""><p class=""><defanged_div class=""><br class=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">christos<br class=""></defanged_div></p><p class=""><defanged_div class=""><br class=""></defanged_div></p><blockquote type="cite" class=""><p class=""><defanged_div class="">On Oct 20, 2022, at 5:55 AM, Arif Driessen <<a href="mailto:arifd86@gmail.com" target="_blank" defanged_rel="noreferrer" class="">arifd86@gmail.com</a>> wrote:</defanged_div></p><defanged_div class=""><br class=""><p class=""><defanged_div class=""></defanged_div></p><p class=""><u class=""></u><u class=""></u></p><p class=""><u class=""></u>Hello,<u class=""></u></p><u class=""></u><p class=""><u class=""></u><br class=""><u class=""></u></p><u class=""></u><p class=""><u class=""></u>I am using `file` to get the mime-type of blobs of data streamed to me. I open a process and a pipe, and a pass the bytes as they come to me to `file`. Then I close the pipe and wait for `file` to return me a mime-type.<u class=""></u></p><u class=""></u><p class=""><u class=""></u><br class=""><u class=""></u></p><u class=""></u><p class=""><u class=""></u>This works wonderfully, except, I'm worried, that file may be collecting into RAM the entire contents of the buffer as they are being piped.<br class=""><br class=""><u class=""></u></p><u class=""></u><p class=""><u class=""></u>For example, if I am given an 180GiB zip file, and I keep feeding those bytes to the pipe, will it blow up my RAM? Or does `file` employ something cleverl; even if just writing to the file system, or perhaps working on chunks and forgetting the past?<br class=""><br class=""><u class=""></u></p><u class=""></u><p class=""><u class=""></u>Thanks for your help!<br class=""><br class=""><u class=""></u></p><u class=""></u><p class=""><u class=""></u>Arif Driessen<br class=""><u class=""></u></p><u class=""></u><p class=""><defanged_div class=""><br class=""></defanged_div></p><defanged_div class=""><u class=""></u>
-- <br class="">File mailing list<br class=""><a href="mailto:File@astron.com" target="_blank" defanged_rel="noreferrer" class="">File@astron.com</a><br class=""><a href="https://mailman.astron.com/mailman/listinfo/file" target="_blank" defanged_rel="noreferrer" class="">https://mailman.astron.com/mailman/listinfo/file</a><br class=""><defanged_span id="m_-583133778578176195cid:CBD667B6-5748-4DFD-BDFC-9322973C81A4" class=""><sanitizer.log></defanged_span><u class=""></u><u class=""></u><u class=""></u><u class=""></u><u class=""></u><u class=""></u><u class=""></u><u class=""></u><u class=""></u><div class=""><br class="webkit-block-placeholder"></div><defanged_div class=""></defanged_div></defanged_div></defanged_div></blockquote><div class=""><br class="webkit-block-placeholder"></div><defanged_div class=""><br class=""><div class=""><br class="webkit-block-placeholder"></div><defanged_div class=""><div class=""><br class="webkit-block-placeholder"></div><defanged_div class=""></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></blockquote><div class=""><br class="webkit-block-placeholder"></div><defanged_div class=""><div class=""><br class="webkit-block-placeholder"></div><defanged_div class=""><div class=""><br class="webkit-block-placeholder"></div><defanged_div class="">
<span id="cid:97784EFA-D431-4BDB-BCDF-4DC26060CDEC"><sanitizer.log></span></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></div></blockquote></div><br class=""></div></body></html>