Skip to content

detectFormat

detectFormat(data): Format | undefined

Defined in: next/api.d.ts:356

The format of data, as decompress detects it, or undefined if it finds none, as for empty data. It is never 'deflate-raw', which has no header to recognize, and brotli data, which has no magic number, is only recognized when its start decodes.

Input

Format | undefined

A TypeError with the code ERR_COMPRS_INVALID_ARG if data is not an Input.