.. highlightlang:: us .. _mem_uncompress: mem_uncompress ============== .. index:: mem_uncompress .. us.tag mem_uncompress ENGLISH New420 Changed606 mem file-zip :ref:`mem_uncompress` uncompresses a string that was compressed with :ref:`mem_compress` or zlib. .. function:: ssString = mem_uncompress(ssStringCompressed) ssByteString = mem_uncompress(ssByteCompressed, nDestLen) .. us.return **Return Value** *ssString* is a scalar string which may contain Null-characters. *ssByteString*: If invoked with two parameters, *ssByteString* contains the zlib compressed data (without the 8 byte header, described in :ref:`mem_compress`). .. us.params **Parameters** .. uparam:: ssStringCompressed *ssStringCompressed* is the compressed string (:ref:`mem_compress`). .. uparam:: ssByteCompressed *ssByteCompressed* is a zlib compressed string. .. uparam:: nDestLen *nDestLen* is the size in bytes of the uncompressed *ssByteCompressed* string. .. us.example **Example** see :ref:`mem_compress`. Invoke with 2 parameters:: def test_mem_compress() { ssData = "Hello World, this is the data to compress"; c = mem_compress(ssData); // Remove 8 byte header nbytes = mem_len(c); ssCompressed = mem_get(c, 9, nbytes-8); ssD= mem_uncompress(ssCompressed, strlen(ssData)); ssData2 = mem_unpack(ssD); if (ssData2 != ssData) { error(); } } .. us.comment **Comment** This function uses the zlib-Library (http://www.gzip.org/zlib/). Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2018.6 - New Parameter *nDestLen* * - 5.0.0 - ??? * - 4.2.0 - New .. seealso:: :ref:`overview-strings`, :ref:`file-zip`, :ref:`mem_compress`, :ref:`CompressFile`, :ref:`DeCompressFile` :sub:`id-290043`