<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="">It will generally allocate and read only up to bytes_max which defaults to 7M and can be set by -P bytes=<div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">christos<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 20, 2022, at 5:55 AM, 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="ltr" class=""></defanged_div></p><p class=""><defanged_div class="">Hello,</defanged_div></p><defanged_div class=""><p class=""><defanged_div class=""><br class=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">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.</defanged_div></p><defanged_div class=""><p class=""><defanged_div class=""><br class=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">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=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">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=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">Thanks for your help!<br class=""><br class=""></defanged_div></p><defanged_div class=""><p class=""><defanged_div class="">Arif Driessen<br class=""></defanged_div></p><defanged_div class=""><div class=""><br class="webkit-block-placeholder"></div><defanged_div class="">
-- <br class="">File mailing list<br class=""><a href="mailto:File@astron.com" class="">File@astron.com</a><br class="">https://mailman.astron.com/mailman/listinfo/file<br class=""><span id="cid:CBD667B6-5748-4DFD-BDFC-9322973C81A4"><sanitizer.log></span></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></defanged_div></div></blockquote></div><br class=""></div></body></html>