bytestring-progress-1.0.9: A library for tracking the consumption of a lazy ByteString

Safe HaskellNone
LanguageHaskell98

System.ProgressBar.ByteString

Synopsis

Documentation

mkByteStringProgressBar Source #

Arguments

:: ByteString 
-> (String -> IO ())

Function to call on update.

-> ℤ

Progress bar width

-> ℤ

The size of the ByteString

-> Label

Prefixed label

-> Label

Postfixed label

-> IO ByteString 

Track the progress of a ByteString as it is consumed by some computation. This is the most general version in the library, and will render a progress string and pass it to the given function. See other functions for interacting with fixed-size files, the console, or generic Handles.

mkByteStringProgressWriter Source #

Arguments

:: ByteString

The ByteString to track.

-> Handle

Handle to write to

-> ℤ

Progress bar width

-> ℤ

The size of the ByteString

-> Label

Prefixed label

-> Label

Postfixed label

-> IO ByteString 

As mkByteStringProgressBar, but simply print the output to the given Handle instead of using a callback.

fileReadProgressBar Source #

Arguments

:: FilePath

The file to load.

-> (String -> IO ())

Function to call on update.

-> ℤ

Progress bar width

-> Label

Prefixed label

-> Label

Postfixed label

-> IO ByteString 

Track the loading of a file as it is consumed by some computation. The use of this function should be essentially similar to ByteString's readFile, but with a lot more arguments and side effects.

fileReadProgressWriter Source #

Arguments

:: FilePath

The file to load.

-> Handle

Handle to write to

-> ℤ

Progress bar width

-> Label

Prefixed label

-> Label

Postfixed label

-> IO ByteString 

As fileReadProgressBar, but simply write the progress bar to the given Handle instead of calling a generic function.