linux - gzip and pipe to output (performance consideration) -


q1) can check if gzip -c file | encrypt (some parameters)

a) gzip print out output line line , pipe encrypt function or

b) gzip perform 1st, output pipe @ once encrypt function ?

====================================================

q2) performing gzip | encrypt have better performance considerations gzip, encrypt

regards, noob

gzip streaming compressor/decompressor. (for large enough inputs) compressor/decompressor starts writing output before has seen whole input.

that's 1 of reasons gzip compression used http compression. sender can compress while it's still generating content; recipient can work on decompressing first part of content, while still receiving rest.

gzip not work "line-by-line", because doesn't know line is. work "chunk-by-chunk", compressor defines size of chunk.

"performance" vague word, , complex area give yes or no answer.

with gzip -c file | encrypt, large enough file, see encrypt , gzip working concurrently. is, encrypt encrypting first compressed block before gzip compresses last chunk of file.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -