Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GzipUI

Class to generate UIs for compressing files

extends

UI

Hierarchy

  • UI
    • GzipUI

Index

Constructors

constructor

  • new GzipUI(fullFilename: string, destination: string, total: number): GzipUI
  • Instantiate a new GzipUI

    Parameters

    • fullFilename: string

      The filename in the format filename.extension

    • destination: string

      The path to store the compressed file

    • total: number

      The total amount of bytes of the source file

    Returns GzipUI

Accessors

destination

  • get destination(): string

fullFilename

  • get fullFilename(): string

screen

  • get screen(): Screen

total

  • get total(): number
  • Getter for the total amount of bytes

    Returns number

Methods

buildUI

  • buildUI(barOptions?: ContribWidgets.GaugeOptions | undefined, boxOptions?: BoxOptions | undefined): Status
  • GzipUI implementation of buildUI

    Parameters

    • Optional barOptions: ContribWidgets.GaugeOptions | undefined

      Options for the gauge progress bar to be displayed in the UI

    • Optional boxOptions: BoxOptions | undefined

      Options for the text box to be displayed in the UI

    Returns Status

    The current Status of the rendered elements

updateUI

  • updateUI(status: Status, written: number, data: string | Buffer, isFinished: boolean): void
  • GzipUI implementation of updateUI

    Parameters

    • status: Status

      The current status object to be updated

    • written: number

      The amount of bytes written to the compressed file

    • data: string | Buffer

      The amount of bytes transferred

    • isFinished: boolean

      Check if the compression has finished

    Returns void

Generated using TypeDoc