Classic ASP
Classic ASP
Decompress Bytes
See more Compression Examples
Demonstrates how to decompress binary data.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' See this example to compress bytes: Compress Bytes
set fac = Server.CreateObject("Chilkat.FileAccess")
compressedBytes = fac.ReadEntireFile("qa_data/compressed/compressedBmp.dat")
If (fac.LastMethodSuccess <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( fac.LastErrorText) & "</pre>"
Response.End
End If
set compress = Server.CreateObject("Chilkat.Compression")
compress.Algorithm = "deflate"
decompressedBytes = compress.DecompressBytes(compressedBytes)
If (compress.LastMethodSuccess <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( compress.LastErrorText) & "</pre>"
Response.End
End If
success = fac.WriteEntireFile("qa_output/decompressed.bmp",decompressedBytes)
If (fac.LastMethodSuccess <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( fac.LastErrorText) & "</pre>"
Response.End
End If
%>
</body>
</html>