import { ByteArray } from '../types.js'; /** * Replaces occurrences of a search buffer with a replacement buffer within a target buffer. * * @typeParam T - The type of the target buffer, extending ByteArray. * @param searchBuffer - The byte pattern to search for. * @param replaceBuffer - The byte pattern to replace with. * @param targetBuffer - The buffer to search within. * @param multiple - Whether to replace all occurrences or just the first. Defaults to false. * @returns A new byte array with the replacements made. * @throws Error if the search buffer is not found in the target buffer. * * @example * ```typescript * const result = replaceInBuffer( * new Uint8Array([1, 2]), * new Uint8Array([3, 4, 5]), * new Uint8Array([0, 1, 2, 6]) * ) // Returns Uint8Array([0, 3, 4, 5, 6]) * ``` */ export declare function replaceInBuffer(searchBuffer: ByteArray, replaceBuffer: ByteArray, targetBuffer: T, multiple?: boolean): ByteArray;