There is a json string that bittrix api returns.

{"C":"d-88903F9C-uIVg,2|Cv,81594","G":"f8N0wWnjI7HYfemJI8e0xCbSANWfxnpNCIT4iAHhWDhZjpcgeesgN6r5uUtMrGXJhuLnOyMI52yEsxDhlxcpAJc6+oPWpOx4b7k2EWza50QZM5sNKXQHzanncDgQPzJQc7yWAg==","M":[]} 

What comes after G is the idea of ​​a gzip string. I am trying to decrypt it, but he writes {"Неизвестный тип блока. Поток может быть поврежден."}

 public static string Decode(string wireData) { try { // Step 1: Base64 decode the wire data into a gzip blob byte[] gzipData = Convert.FromBase64String(wireData); // Step 2: Decompress gzip blob into minified JSON using (var decompressedStream = new MemoryStream()) using (var compressedStream = new MemoryStream(gzipData)) using (var deflateStream = new DeflateStream(compressedStream, CompressionMode.Decompress)) { deflateStream.CopyTo(decompressedStream); decompressedStream.Position = 0; using (var streamReader = new StreamReader(decompressedStream)) { return streamReader.ReadToEnd(); } } } catch (Exception ex) { return ""; } } 
  • Gzipstream In general, it seems that Base64 there, and then GZip . - LLENN
  • @LLENN well, so my code does this - Rajab
  • one
    @Radzhab because it is neither gzip nor deflate, read docks - Zergatul

0