import * as stream from 'stream'; import { c as TileFormat } from '../types-yLQy3AKR.js'; import '@maplibre/maplibre-gl-style-spec'; import 'geojson'; import 'type-fest'; import 'readable-stream'; import 'events'; /** * For a given buffer, determine the tile format based on the magic bytes. * Will throw for unknown file types. * Smaller and faster version of magic-bytes.js due to the limited use case. * * @param {Buffer | Uint8Array} buf * @returns {import("../writer.js").TileFormat} */ declare function getTileFormatFromBuffer(buf: Buffer | Uint8Array): TileFormat; /** * Determine the tile format from either a readable stream, buffer or Uint8Array * from the magic bytes at the start of the file. Used if data is served without * a content-type header. * * @param {import('stream').Readable} tileData * @returns {Promise<[import("../writer.js").TileFormat, import('stream').Readable]>} */ declare function getTileFormatFromStream(tileData: stream.Readable): Promise<[TileFormat, stream.Readable]>; /** * Get the tile format from a MIME type. Throws for unsupported types. * * @param {string} mimeType * @returns {import("../writer.js").TileFormat} */ declare function getFormatFromMimeType(mimeType: string): TileFormat; export { getFormatFromMimeType, getTileFormatFromBuffer, getTileFormatFromStream };