# QB64.com

## QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _INFLATE\$ function decompresses a STRING compressed by the _DEFLATE\$ function.

## Syntax

result\$ = _INFLATE\$(stringToDecompress\$[, originalSize&])

## Description

• result\$ will contain the original version of stringToDecompress\$.
• Optional parameter originalSize& can be used if the original size of the uncompressed data is known beforehand, which makes the decompression routine run more efficiently.
• If unspecified, decompression still works as expected, but may use more steps and need to allocate more memory internally.

## Availability

• Version 1.4 and up.

## Example(s)

Compressing a long string of text.

``````
a\$ = "The quick brown fox jumps over the lazy dog. "
PRINT "Original string (a\$): "; a\$
FOR i = 1 TO 15
a\$ = a\$ + a\$
NEXT

PRINT "After concatenating it into itself several times, LEN(a\$) ="; LEN(a\$)

b\$ = _DEFLATE\$(a\$)
PRINT "After using _DEFLATE\$ to compress it, LEN ="; LEN(b\$)
PRINT USING "(compressed size is #.###% of the original)"; ((LEN(b\$) * 100) / LEN(a\$))
c\$ = _INFLATE\$(b\$)
PRINT "After using _INFLATE\$ to decompress it, LEN ="; LEN(c\$)

``````
``````
Original string (a\$): The quick brown fox jumps over the lazy dog
After concatenating it into itself several times, LEN(a\$) = 1474560
After using _DEFLATE\$ to compress it, LEN = 4335
(compressed size is 0.295% of the original)
After using _INFLATE\$ to decompress it, LEN = 1474560

``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.6322855,"math_prob":0.9773556,"size":1336,"snap":"2023-14-2023-23","text_gpt3_token_len":380,"char_repetition_ratio":0.1539039,"word_repetition_ratio":0.09569378,"special_character_ratio":0.28742516,"punctuation_ratio":0.116883114,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96076024,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-03T04:57:01Z\",\"WARC-Record-ID\":\"<urn:uuid:9450b662-90af-4393-8428-a8a5f3000098>\",\"Content-Length\":\"7613\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:266a3422-aed8-4f07-86b3-c4d6cf28b91e>\",\"WARC-Concurrent-To\":\"<urn:uuid:570c2e65-2464-4018-8f3c-ede0c789d485>\",\"WARC-IP-Address\":\"185.199.108.153\",\"WARC-Target-URI\":\"https://qb64.com/wiki/_INFLATE$\",\"WARC-Payload-Digest\":\"sha1:6NTVLX3ZJIQZJCDLIRP26IDQZRWXYOZD\",\"WARC-Block-Digest\":\"sha1:ZS625JJWC5VJJ7SLBEAPCPLY5X5OPGNI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224649105.40_warc_CC-MAIN-20230603032950-20230603062950-00250.warc.gz\"}"}