That clarifies it. Thnx! On Thursday, July 16, 2015 at 5:18:33 PM UTC+2, Johannes Rudolph wrote: > > Hi Jeroen, > > On Thu, Jul 16, 2015 at 4:35 PM, Jeroen Rosenberg > <[email protected] <javascript:>> wrote: > >> def gunzip(bytes: Array[Byte]) = { > >> val output = new ByteArrayOutputStream() > >> FileUtils.copyAll(new GZIPInputStream(new > ByteArrayInputStream(bytes)), > >> output)) > >> output.toString > >> } > > This creates a new GZIPInputStream for every chunk (incidentally: how > the chunks are cut is not under your control). However, gzip > compression is stateful and recreating the GZIPInputStream will reset > the state every time you create a new instance. Therefore, it cannot > work as simple as this. > > The `Gzip.decoderFlow`, in contrast, keeps this state between chunks. > > -- > Johannes > > ----------------------------------------------- > Johannes Rudolph > http://virtual-void.net >
-- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
