Thanks, that did the trick. For the record, I was doing:
>
> def gunzip(bytes: Array[Byte]) = {
>   val output = new ByteArrayOutputStream()
>   FileUtils.copyAll(new GZIPInputStream(new ByteArrayInputStream(bytes)), 
> output))
>   output.toString
> }
>
 

> ... // further in the code as part of my Flow graph
> .map(byteString => gunzip(byteString.toArray()))


I replaced it with 

> .via(Gzip.decoderFlow)


Now it works :)

Thanks so much for your help!
On Thursday, July 16, 2015 at 4:24:11 PM UTC+2, Johannes Rudolph wrote:
>
> Hi Jeroen, 
>
> On Thu, Jul 16, 2015 at 4:05 PM, Jeroen Rosenberg 
> <[email protected] <javascript:>> wrote: 
> > Anyways, it's working as expected. I do have one small unrelated issue. 
> The 
> > stream I am consuming is in Gzip format, so I'm unzipping the 
> ByteStrings as 
> > they come in as part of my FlowGraph. However, when I try to unzip the 
> > ByteString coming out of the response.entity.dataBytes source I'm 
> getting 
> > errors on the Gzip format. As if the Chunks I'm getting are incomplete. 
>
> Can you show some code? Are you using 
> `akka.http.scaladsl.coding.Gzip`? If not, can you try if that works? 
> You should be able to either use `Gzip.decode(response)`, 
> `Gzip.decode(response.entity)`, or use `Gzip.decoderFlow` manually. 
>
> Johannes 
>

-- 
>>>>>>>>>>      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.

Reply via email to