Hello, You could (at least in theory) spawn a gzip process that writes to a FIFO* (named pipe) and then use fs.readFileSync() to read that FIFO. Your process should block till you have completed reading in the FIFO. Create a wrapper function to do this an you have a blocking gzip() routine!
* Might not work on windows. Regards, -Dhruv. On Apr 18, 5:12 am, Axel Kittenberger <[email protected]> wrote: > Is there some easy way to make yourself a zlib.gzipSync wrapper around > the nodes default callback/pipe interface to zlib? (Without streamline > or fibers) > > Its for the server startup sequence where it generates one hugh > javascript file for the client side to download and it keeps it raw as > well gzipped in memory. It does read the files with readSyncFile etc. > So yes I want the node process to be halted until it is done. Its fine > it takes 2 seconds, so please don't argue it could do this or that in > parallel. I also do the other *Sync calls for startup. I just want to > keep that simple please. > > - Axel -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
