UNPKG

buroventures-harald-code-core

Version:

Harald Code Core - Core functionality for AI-powered coding assistant

14 lines (13 loc) 536 B
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Checks if a Buffer is likely binary by testing for the presence of a NULL byte. * The presence of a NULL byte is a strong indicator that the data is not plain text. * @param data The Buffer to check. * @param sampleSize The number of bytes from the start of the buffer to test. * @returns True if a NULL byte is found, false otherwise. */ export declare function isBinary(data: Buffer | null | undefined, sampleSize?: number): boolean;