import type { NobjcObject } from "objc-js";
import type { _NSCopying } from "./NSCopying.js";
import type { _NSMutableCopying } from "./NSMutableCopying.js";
import type { _NSObject } from "./NSObject.js";
import type { _NSSecureCoding } from "./NSSecureCoding.js";
import type { _NSString } from "./NSString.js";
import type { _NSURL } from "./NSURL.js";
import type { NSRange } from "../structs/NSRange.js";
import type { NSDataBase64DecodingOptions } from "./NSDataBase64DecodingOptions.js";
import type { NSDataBase64EncodingOptions } from "./NSDataBase64EncodingOptions.js";
import type { NSDataCompressionAlgorithm } from "./NSDataCompressionAlgorithm.js";
import type { NSDataReadingOptions } from "./NSDataReadingOptions.js";
import type { NSDataSearchOptions } from "./NSDataSearchOptions.js";
import type { NSDataWritingOptions } from "./NSDataWritingOptions.js";
export declare class _NSData extends _NSObject {
    static alloc(): _NSData;
    static new(): _NSData;
    init(): _NSData;
    static data(): _NSData;
    static dataWithBytes$length$(bytes: Uint8Array | null, length: number): _NSData;
    static dataWithBytesNoCopy$length$(bytes: Uint8Array, length: number): _NSData;
    static dataWithBytesNoCopy$length$freeWhenDone$(bytes: Uint8Array, length: number, b: boolean): _NSData;
    static dataWithContentsOfFile$options$error$(path: _NSString, readOptionsMask: NSDataReadingOptions, errorPtr: NobjcObject | null): _NSData | null;
    static dataWithContentsOfURL$options$error$(url: _NSURL, readOptionsMask: NSDataReadingOptions, errorPtr: NobjcObject | null): _NSData | null;
    static dataWithContentsOfFile$(path: _NSString): _NSData | null;
    static dataWithContentsOfURL$(url: _NSURL): _NSData | null;
    static dataWithData$(data: _NSData): _NSData;
    /**
     * @deprecated Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.
     */
    static dataWithContentsOfMappedFile$(path: _NSString): NobjcObject | null;
    getBytes$length$(buffer: Uint8Array, length: number): void;
    getBytes$range$(buffer: Uint8Array, range: NSRange): void;
    isEqualToData$(other: _NSData): boolean;
    subdataWithRange$(range: NSRange): _NSData;
    writeToFile$atomically$(path: _NSString, useAuxiliaryFile: boolean): boolean;
    /**
     * the atomically flag is ignored if the url is not of a type the supports atomic writes
     */
    writeToURL$atomically$(url: _NSURL, atomically: boolean): boolean;
    writeToFile$options$error$(path: _NSString, writeOptionsMask: NSDataWritingOptions, errorPtr: NobjcObject | null): boolean;
    writeToURL$options$error$(url: _NSURL, writeOptionsMask: NSDataWritingOptions, errorPtr: NobjcObject | null): boolean;
    rangeOfData$options$range$(dataToFind: _NSData, mask: NSDataSearchOptions, searchRange: NSRange): NSRange;
    /**
     * 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES.
     */
    enumerateByteRangesUsingBlock$(block: (bytes: NobjcObject, byteRange: NSRange, stop: NobjcObject) => void): void;
    initWithBytes$length$(bytes: Uint8Array | null, length: number): _NSData;
    initWithBytesNoCopy$length$(bytes: Uint8Array, length: number): _NSData;
    initWithBytesNoCopy$length$freeWhenDone$(bytes: Uint8Array, length: number, b: boolean): _NSData;
    initWithBytesNoCopy$length$deallocator$(bytes: Uint8Array, length: number, deallocator: ((bytes: NobjcObject, length: number) => void) | null): _NSData;
    initWithContentsOfFile$options$error$(path: _NSString, readOptionsMask: NSDataReadingOptions, errorPtr: NobjcObject | null): _NSData | null;
    initWithContentsOfURL$options$error$(url: _NSURL, readOptionsMask: NSDataReadingOptions, errorPtr: NobjcObject | null): _NSData | null;
    initWithContentsOfFile$(path: _NSString): _NSData | null;
    initWithContentsOfURL$(url: _NSURL): _NSData | null;
    initWithData$(data: _NSData): _NSData;
    /**
     * Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64.
     */
    initWithBase64EncodedString$options$(base64String: _NSString, options: NSDataBase64DecodingOptions): _NSData | null;
    /**
     * Create a Base-64 encoded NSString from the receiver's contents using the given options.
     */
    base64EncodedStringWithOptions$(options: NSDataBase64EncodingOptions): _NSString;
    /**
     * Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64.
     */
    initWithBase64EncodedData$options$(base64Data: _NSData, options: NSDataBase64DecodingOptions): _NSData | null;
    /**
     * Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options.
     */
    base64EncodedDataWithOptions$(options: NSDataBase64EncodingOptions): _NSData;
    /**
     * These methods return a compressed or decompressed version of the receiver using the specified algorithm.
     */
    decompressedDataUsingAlgorithm$error$(algorithm: NSDataCompressionAlgorithm, error: NobjcObject | null): _NSData | null;
    compressedDataUsingAlgorithm$error$(algorithm: NSDataCompressionAlgorithm, error: NobjcObject | null): _NSData | null;
    /**
     * @deprecated This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead.
     */
    getBytes$(buffer: Uint8Array): void;
    /**
     * @deprecated Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.
     */
    initWithContentsOfMappedFile$(path: _NSString): NobjcObject | null;
    /**
     * These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0.
     * @deprecated Use initWithBase64EncodedString:options: instead
     */
    initWithBase64Encoding$(base64String: _NSString): NobjcObject | null;
    /** @deprecated Use base64EncodedStringWithOptions: instead */
    base64Encoding(): _NSString;
    length(): number;
    /**
     * The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data.
     */
    bytes(): NobjcObject;
    description(): _NSString;
}
export interface _NSData extends _NSCopying, _NSMutableCopying, _NSSecureCoding {
}
