[ 
https://issues.apache.org/jira/browse/CB-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14967522#comment-14967522
 ] 

ASF GitHub Bot commented on CB-9839:
------------------------------------

Github user daserge commented on the pull request:

    
https://github.com/apache/cordova-plugin-file-transfer/pull/85#issuecomment-149973070
  
    @sviluppatoribk, thanks for your contribution!
    I have filed a Jira issue for this:
    https://issues.apache.org/jira/browse/CB-9839
    
    In order this to be merged could you please rebase, squash and rename 
commit and PR to `"CB-9839 Add gzip support to file-transfer.download on wp8"`?
    Also please sign the ICLA: 
http://www.apache.org/dev/new-committers-guide.html#cla
    
    gzip-case also needs an update in terms of progress event as length becomes 
non computable; the code change can be the following:
    ```csharp
    bool useGzip = encodingHeader.Contains("gzip");
    using (Stream responseStreamGz = useGzip ? new 
GZipStream(response.GetResponseStream(), CompressionMode.Decompress) : 
response.GetResponseStream())
    ...
    if (buffer.Length > 0 && !reqState.isCancelled)
    {
        writer.Write(buffer);
    
        if (useGzip)
        {
            DispatchFileTransferProgress(0, 0, callbackId);
        }
        else
        {
            DispatchFileTransferProgress(bytesRead, totalBytes, callbackId);
        }
    }
    ...
    ```


> Add gzip support to file-transfer.download on wp8
> -------------------------------------------------
>
>                 Key: CB-9839
>                 URL: https://issues.apache.org/jira/browse/CB-9839
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: Plugin File Transfer
>            Reporter: Sergey Shakhnazarov
>            Assignee: Sergey Shakhnazarov
>              Labels: gzip, wp8
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to