e-CryptIt Engine - Compression Xojo Plugin |

# EinhugurZstandard.SetProgressHandler Method (console safe)

Sets progress handler for the compression or decompression.

SetProgressHandler(
handler as EinhugurZstandard.ProgressDelegate,
sourceLengthHint as UInt64)

#### Parameters

handler
  The handler to set.
sourceLengthHint
  Optional parameter to set the length of the source. You will want to set this if your source is IBinaryStreamReader since else the progress handler wont know the total length.

#### Remarks

Do use the total value directly on Xojo Progress bar, that will create problems. Rather set maximum on the progress bar to 100 for example and have your handler like this:

Public Sub OnProgress(value as UInt64, total as UInt64, extraInfo as UInt64, ByRef cancel as Boolean)
ProgressBar1.Value = value / total * 100 100.0
End Sub

#### See Also

EinhugurZstandard Class