UNPKG

extract-base-iterator

Version:

Base iterator for extract iterators like tar-iterator and zip-iterator

28 lines (27 loc) 1.32 kB
/** * Shared utilities for iterator libraries * * These utilities are designed to be used by: * - zip-iterator * - 7z-iterator * - tar-iterator * - Any other archive iterator library * * All utilities support Node.js 0.8+ */ import BufferList from './BufferList.js'; export { BufferList }; /** * Type alias for Buffer or BufferList - both can be read byte-by-byte. * Use this when an API should accept either contiguous data (Buffer) * or chunked streaming data (BufferList). */ export type BufferLike = Buffer | BufferList; export { allocBuffer, allocBufferUnsafe, bufferCompare, bufferConcat, bufferEquals, bufferFrom, bufferSliceCopy, canAllocateBufferSize, createInflateRawStream, inflateRaw, isNaN, MAX_SAFE_BUFFER_LENGTH, objectAssign, PassThrough, Readable, readUInt64LE, Transform, Writable, writeUInt64LE, } from './compat.js'; export { crc32, crc32Region, verifyCrc32, verifyCrc32Region } from './crc32.js'; export { default as EntryStream } from './EntryStream.js'; export { type CleanupFn, default as Lock } from './Lock.js'; export { default as normalizePath } from './normalizePath.js'; export { default as safeJoinPath } from './safeJoinPath.js'; export { default as streamToString, type StreamToStringCallback } from './streamToString.js'; export { default as stripPath } from './stripPath.js';