This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathcompress.lcdoc
More file actions
61 lines (42 loc) · 1.71 KB
/
compress.lcdoc
File metadata and controls
61 lines (42 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Name: compress
Type: function
Syntax: the compress of <data>
Syntax: compress(<data>)
Summary:
<return|Returns> a gzip-compressed <string>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
compress(URL "file:image.pict")
Example:
put compress(field "Outgoing") into URL "binfile:data.gz"
Parameters:
data (string):
A string of binary data of any length.
Returns:
The <compress> <function> <return|returns> a <string> of
<binary file|binary data>.
Description:
Use the <compress> <function> to <compress> data to a smaller size for
transmission.
The <compress> <function> is the <inverse> of the <decompress>
<function>.
The compressed result is typically about half to a third the size of the
original data, although different results may be obtained depending on
the amount of data and whether it has already been compressed.
>*Important:* The value <return|returned> by the <compress> <function>
> consists of <binary file|binary data> and may include control
> characters, so displaying it on screen or trying to edit it may
> produce unexpected results. If you use a <URL> to place the
> <return|returned> data in a <file>, it's important to use the
> <binfile> <URL> scheme; using the <file> <URL> scheme will corrupt
> <binary file|binary data>.
For technical information about the format used by the <compress>
<function>, see [RFC 1952](https://tools.ietf.org/html/rfc1952). The
<compress> <function> uses the zlib compression library.
References: function (control structure), compress (function),
decompress (function), return (glossary), binary file (glossary),
URL (keyword), inverse (keyword), file (keyword), binfile (keyword),
string (keyword)
Tags: text processing