# SQUEEZ

> [HTML Version](squeez_sbr.htm)

_Written March 2021_

**xcall SQUEEZ, outbuf, cbout, inbuf\{, cbin\}**

SQUEEZ implements the data "squeeze" algorithm used by the MX\_FILEHOOK File-Based File Hook Handler.

**Parameters**

_outbuf_  (X)  \[out\] 

Receives the squeezed version of the data in _inbuf_. Note that it should either be dynamic (X,0) or a fixed size greater than or equal to two times the size of _inbuf_. Although in most cases the squeezed data will be much smaller than the original, the worst case could be twice as large.

_cbout_  (Signed [Num](num.md))  \[out\]

Receives the number of bytes written to _outbuf_. A negative value indicates an error, most likely that the _outbuf_ wasn't large enough. Note that you should use this value rather than the size of _outbuf_ to determine how much of its contents to process.

_inbuf_  (X)  \[in\]

The raw data to be squeezed.

cbin  ([Num](num.md))  \[in\]

If specified, this determines the number of bytes in _inbuf_ to process. If omitted, the entire contents of _inbuf_ is processed.

**Comments**

You can use the Fn'Hooklog'Read'Squeezed() function in [fnfhooklog.bsi in SOSLIB:\[907,10\]](https://bitbucket.org/microsabio/soslib/src/master/907010/fnfhooklog.bsi) to unsqueeze the data. Note that unlike the actual file hook routine, SQUEEZ doesn't automatically include any envelope with the data. You should probably include your own envelope, or at least a designated packet start byte make sure that your unsqueeze operation is in sync with the data.

See [File-Based File Hook Handler](file-basedfilehookhandler.md) for details on the squeeze algorithm.

**History**

2021 March, A-Shell 6.5.1699:  Add function to A-Shell.

