Skip to content

FileSystemManager.readCompressedFile ​

JS
    FileSystemManager.readCompressedFile(Object object)

Reads the content of a local file with a specified compression type

Parameters

  • Object object: Input parameters. See the table below for details.

object properties:

PropertyValue TypeDefaultRequiredDescription
filePathstringYesPath of the compressed file to read
compressionAlgorithmstringYesFile compression type. Currently only 'br' is supported.
successfunctionNoCallback for a successful call
failfunctionNoCallback for a failed call
completefunctionNoCallback for when the call ends

Valid values of compressionAlgorithm:

ValueDescription
brBrotli compression

Parameters of the success callback

  • Object res: Returns information

res properties:

PropertyValue TypeDescription
dataArrayBufferFile content

Parameters of the fail callback

  • Object res: Returns error information

res properties:

PropertyValue TypeDescription
errMsgstringError information