locked
Does WinRT support 64 bits data from Web Service

    Question

  • Hi, having encountered some problems on receiving data from Web Service.  The image file is saved but it has no image.

    now I am taking the problem layer by layer.

    If the server return  image in (64 bits-base) Base64 image string, how can I decompress it?

    The code below will not be able to handle.

       var bytes = Convert.FromBAse64String(base64Pic);

    Thanks

     

    Saturday, March 15, 2014 7:37 AM

Answers

All replies

  • FromBAse64String should do it, assuming you have appropriate data to begin with.

    I believe I've asked before, but can you share a minimal project and data source to demonstrate the problem? Otherwise we don't have enough information to help you.

    --Rob

    Saturday, March 15, 2014 11:34 AM
    Owner
  • Hi,

    I have tested using below code for server that return 64 bits-base BASE64 image string

    var bytes = Convert.FromBAse64String(base64Pic);

    The problem:

    - The image is blank.

    Below is the small file size of 64 bits BASE64 image string :

    string str64bitPic="H4sIAAAAAAAEAO1U51PTCRT80Q4IoBxdkCrFMaFJEVFOQzF0BRGNB5hAADlRxNAFQgyhxggqIRyih0iRFogFBClJ8CCAEJQuEorSu6EYAlz8C27u6407s29n99P78N6mnnOFSYGUQQAASDnY27rzlfSDYkL8KcHGsvgigHaHWQOVXQdn+UY4EOoCBYDqexI8pAjfa/jZu7sAQIwuACQkAgCXHyXMAEC4EQDMIQDAkgwAijcf1bmdBAAh4Jyzhx2XAHAfynJztbj5htvFJ7crHLdfXOLVBfJoEbxWPK+btDNQsjNauzPdsbs8sru5tLe3B/zET/xfcOz2CT2+iN+0h6MBYB/9BwXkDzsm8H/rpYMt1CPKZzHnM+mZpRi+oJCEucDdPXu7F8Bqt1gUGwT008uWKsNG4hcA964hf2FCwq9GgmeaxZQEDiH+1YyxdVmcSe4Q5Zp3cf6FJ1PrjwcWL2/Cp6vBVuszmyco9LochYrVAIZyxMqpOKpKQwAlxduJcsSPGhDuJhtBQK2zt3xal/3q3LJTmsb624aVr/dJL+lH/EEilBAg/t555XEsFBY9IRo8yH7TSPbMTtzvebFn+FRauWK9HtvBTV40s5o41s8cvhLtTVuh75OVWByMbA0/yPwWcp/k8cpgMpTGrHiYdcz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ChhOlbFJYLR0uQ1VhzpdIePsr5oBVEWn4QEvoafq3iz0ienO+CV5bvvOKrndotw4bGeZ5Bze1FowqfT6s7g9tBZqUDKPDd/1Qphtor6l3EbKfaCR/ej3JzsHO1rbRG3PkHL+GvoFcIAAA="

    Observation:

    The 64bit Base64 image 1st character is different.

    How to solve this problem?

    Thanks

    Monday, March 17, 2014 1:35 AM
  • Sorry for the confusion.

    The str64bitPic is a GZipStream on the Base64.  I need to decompress it usng Gzipstream.

    Thanks.

    Monday, March 17, 2014 6:31 AM
  • you looked at this class? http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.compression.decompressor.aspx

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, March 17, 2014 7:37 AM