Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

New subroutine SQUEEZ.SBR implements the data "squeeze" algorithm used by the MX_FILEHOOK File-Based File Hook Handler.

xcall SQUEEZ, outbuf, cbout, inbuf{, cbin}

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 the SOSLIB module 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 in the A-Shell Reference for details on the squeeze algorithm.