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 223
Expand file tree
/
Copy pathcompress.xml
More file actions
46 lines (46 loc) · 3.09 KB
/
Copy pathcompress.xml
File metadata and controls
46 lines (46 loc) · 3.09 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
<doc>
<legacy_id>2283</legacy_id>
<name>compress</name>
<type>function</type>
<syntax>
<example>the compress of <i>data</i></example>
<example>compress(<i>data</i>)</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Text and Data Processing</category>
</classification>
<references>
<function tag="decompress">decompress Function</function>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary><glossary tag="return">Returns</glossary> a gzip-compressed <keyword tag="string">string</keyword>.</summary>
<examples>
<example>compress(URL "file:image.pict")</example>
<example>put compress(field "Outgoing") into URL "binfile:data.gz"</example>
</examples>
<description>
<p>Use the <b>compress</b> <control_st tag="function">function</control_st> to <function tag="compress">compress</function> data to a smaller size for transmission.</p><p/><p><b>Parameters:</b></p><p>The <i>data</i> is a <keyword tag="string">string</keyword> of <glossary tag="binary data">binary data</glossary> of any length.</p><p/><p><b>Value:</b></p><p>The <b>compress</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a <keyword tag="string">string</keyword> of <glossary tag="binary data">binary data</glossary>.</p><p/><p><b>Comments:</b></p><p>The <b>compress</b> <control_st tag="function">function</control_st> is the <keyword tag="inverse">inverse</keyword> of the <function tag="decompress">decompress</function> <control_st tag="function">function</control_st>.</p><p/><p>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.</p><p/><p><img src="202653"/> <b>Important!</b> The value <glossary tag="return">returned</glossary> by the <b>compress</b> <control_st tag="function">function</control_st> consists of <glossary tag="binary data">binary data</glossary> and may include control characters, so displaying it on screen or trying to edit it may produce unexpected results. If you use a <keyword tag="URL">URL</keyword> to place the <glossary tag="return">returned</glossary> data in a <keyword tag="file">file</keyword>, it's important to use the <keyword tag="binfile">binfile</keyword> <keyword tag="URL">URL</keyword> scheme; using the <keyword tag="file">file</keyword> <keyword tag="URL">URL</keyword> scheme will corrupt <glossary tag="binary data">binary data</glossary>.</p><p/><p>For technical information about the format used by the <b>compress</b> <control_st tag="function">function</control_st>, see RFC 1952 at <<u>http://www.ietf.org/rfc/rfc1952.txt</u>>. The <b>compress</b> <control_st tag="function">function</control_st> uses the zlib compression library.</p>
</description>
</doc>