Please enable JavaScript to view this site.

A-Shell Reference

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)  [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)  [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] 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 for details on the squeeze algorithm.

History

2021 March, A-Shell 6.5.1699:  Add function to A-Shell.