COMPRESS()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Compresses the given string and returns the binary string result.
EXAMPLES
SELECT HEX(COMPRESS('Now is the time!'));
+----------------------------------------------------------+
| HEX(COMPRESS('Now is the time!')) |
+----------------------------------------------------------+
| 10000000789CF3CB2F57C82C5628C9485528C9CC4D5504002FA10582 |
+----------------------------------------------------------+
SELECT LENGTH(COMPRESS('abc'));
+-------------------------+
| LENGTH(COMPRESS('abc')) |
+-------------------------+
| 15 |
+-------------------------+
SELECT LENGTH(COMPRESS(REPEAT('a',1000)));
+------------------------------------+
| LENGTH(COMPRESS(REPEAT('a',1000))) |
+------------------------------------+
| 21 |
+------------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.