Relative Content

Tag Archive for javascriptstreamcompressionweb-stream

With Web Streams, how can I distinguish if a readable stream is compressed (gzip) or not?

I have a client-side JS aapplication where I want to use Web Streams to process some input file from the user. The file could either be a text file (in which case I just pipe it through a TextDecoderStream and then do whatever I want with it) or a gzipped text file (in which case I need to pipe it through a DecompressionStream before it gets to the TextDecoderStream).