title: Is there Zlib for R ? raw inflate function - how to decompress hexadecimal values
body: <p>I need to decompress hex values and convert those to string. </p>
  
  <p>Actual problem is that i'm not able to figure out how to decompress hex values </p>
  
  <p>Hex do not contain any headers,
  If i copy hex codes to CyberChef i'm able to decompress those and have original string</p>
  
  <p>In CyberChef only Raw Inflate operation is needed
  So i'm hoping help how to do raw inflate in R</p>
  
  <p>I have tried memDecompress using all options without success (i.e gzip etc) </p>
  
  <p>UPDATE:
  Here is a sample from hex: 
  <strong>e3 0e 71 0d 0e f1 54 c8 cb 2f 52 30 02 00</strong> 
  which i'm able to convert using CyberChef to string 
  "<strong>.TESTI nor 2</strong>"      </p>
  
  <pre><code>RLdata&lt;- sqlQuery(connection, ..... AS Varbinary(max) AS NOTEShort ......
  
  &gt; RLdata$NOTEshort[4268]
  [[1]]
   [1] e3 0e 71 0d 0e f1 54 c8 cb 2f 52 30 02 00
  
  &gt; unlist(RLdata$NOTEshort[4268])
   [1] e3 0e 71 0d 0e f1 54 c8 cb 2f 52 30 02 00
  &gt; memDecompress(unlist(RLdata$NOTEshort[4268]),type = "gzip", asChar = TRUE)
  Error in memDecompress(unlist(RLdata$NOTEshort[4268]), type = "gzip",  : 
    internal error -3 in memDecompress(2)
  
  &gt; memDecompress(unlist(RLdata$NOTEshort[4268]),type = "unknown", asChar = TRUE)
  [1] "ã\016q\r\016ñTÈË/R0\002"
  Warning message:
  In memDecompress(unlist(RLdata$NOTEshort[4268]), type = "unknown",  :
    unknown compression, assuming none
  
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/miySJ.png" alt="screenshot from CyberChef (png)"></p>