daft.functions.compress#
compress #
compress(expr: Expression, codec: COMPRESSION_CODEC) -> Expression
Compress binary or string values using the specified codec.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | String | Binary Expression | The expression to compress. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Binary Expression | A binary expression with the compressed value. |
Examples:
1 2 3 4 | |
╭────────────────────────────────╮
│ text │
│ --- │
│ Binary │
╞════════════════════════════════╡
│ b"x\x9c\xcbH\xcd\xc9\xc9\xd7Q… │
╰────────────────────────────────╯
(Showing first 1 of 1 rows) 1 2 | |
╭────────────────────────────────╮
│ text │
│ --- │
│ Binary │
╞════════════════════════════════╡
│ b"x\x9c\xcbH\xcd\xc9\xc9\xd7Q… │
╰────────────────────────────────╯
(Showing first 1 of 1 rows) Source code in daft/functions/binary.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |