Old lady swallowed a fly: Difference between revisions

Content added Content deleted
(Add ARM Assembly)
(Replaced "import zlib" with "import zip/zlib"; changed the call to uncompress.)
Line 2,613: Line 2,613:
=={{header|Nim}}==
=={{header|Nim}}==
{{trans|Python}}
{{trans|Python}}
{{libheader|nim-lang/zip}}
<lang nim>import zlib, base64
<lang nim>import zip/zlib, base64


const b64 = """
const b64 = """
Line 2,624: Line 2,625:
zJvGew/jnZPzclA08yAkikegDTTUMfzwDXBcwoE="""
zJvGew/jnZPzclA08yAkikegDTTUMfzwDXBcwoE="""


echo b64.decode.uncompress()</lang>
proc uncompress*(source: string, destLen: var int): string =
result = newString(destLen)
discard uncompress(result.cstring, addr destLen, source.cstring, source.len)

var length = 10_000
echo b64.decode.uncompress length</lang>


=={{header|OCaml}}==
=={{header|OCaml}}==