From 424252324b55adb17186af97ba3ebbdd1828bce6 Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Fri, 15 Aug 2025 17:59:27 +0800 Subject: [PATCH] bms zlib zip arkts1.2 Signed-off-by: lanhaoyu --- api/@ohos.zlib.d.ts | 304 ++++++++++++++++++++++++++++++++------------ 1 file changed, 224 insertions(+), 80 deletions(-) diff --git a/api/@ohos.zlib.d.ts b/api/@ohos.zlib.d.ts index fed8a3a394..cc2de81680 100644 --- a/api/@ohos.zlib.d.ts +++ b/api/@ohos.zlib.d.ts @@ -19,6 +19,9 @@ */ import { AsyncCallback } from './@ohos.base'; +/*** if arkts 1.2 */ +import { RecordData } from './@ohos.base'; +/*** endif */ /** * @namespace zlib @@ -468,7 +471,8 @@ declare namespace zlib { * @enum { int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum CompressMethod { /** @@ -476,7 +480,8 @@ declare namespace zlib { * * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFLATED = 8, } @@ -600,7 +605,8 @@ declare namespace zlib { * @typedef ZStream * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ZStream { /** @@ -609,7 +615,8 @@ declare namespace zlib { * @type { ?ArrayBuffer } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ nextIn?: ArrayBuffer; @@ -619,7 +626,8 @@ declare namespace zlib { * @type { ?int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ availableIn?: int; @@ -629,7 +637,8 @@ declare namespace zlib { * @type { ?long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ totalIn?: long; @@ -639,7 +648,8 @@ declare namespace zlib { * @type { ?ArrayBuffer } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ nextOut?: ArrayBuffer; @@ -649,7 +659,8 @@ declare namespace zlib { * @type { ?int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ availableOut?: int; @@ -659,7 +670,8 @@ declare namespace zlib { * @type { ?long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ totalOut?: long; @@ -669,7 +681,8 @@ declare namespace zlib { * @type { ?int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ dataType?: int; @@ -679,7 +692,8 @@ declare namespace zlib { * @type { ?long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ adler?: long; } @@ -690,7 +704,8 @@ declare namespace zlib { * @typedef GzHeader * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface GzHeader { /** @@ -699,7 +714,8 @@ declare namespace zlib { * @type { ?boolean } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isText?: boolean; @@ -709,7 +725,8 @@ declare namespace zlib { * @type { ?int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ os?: int; @@ -719,7 +736,8 @@ declare namespace zlib { * @type { ?long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ time?: long; @@ -729,7 +747,8 @@ declare namespace zlib { * @type { ?int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ xflags?: int; @@ -739,7 +758,8 @@ declare namespace zlib { * @type { ?ArrayBuffer } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ extra?: ArrayBuffer; @@ -749,7 +769,8 @@ declare namespace zlib { * @type { ?int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ extraLen?: int; @@ -759,7 +780,8 @@ declare namespace zlib { * @type { ?ArrayBuffer } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ name?: ArrayBuffer; @@ -769,7 +791,8 @@ declare namespace zlib { * @type { ?ArrayBuffer } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ comment?: ArrayBuffer; @@ -779,7 +802,8 @@ declare namespace zlib { * @type { ?boolean } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ hcrc?: boolean; @@ -789,7 +813,8 @@ declare namespace zlib { * @type { ?boolean } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ done?: boolean; } @@ -800,7 +825,8 @@ declare namespace zlib { * @typedef ZipOutputInfo * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ZipOutputInfo { /** @@ -809,7 +835,8 @@ declare namespace zlib { * @type { ReturnStatus } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ status: ReturnStatus @@ -819,7 +846,8 @@ declare namespace zlib { * @type { long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ destLen: long } @@ -830,7 +858,8 @@ declare namespace zlib { * @typedef DictionaryOutputInfo * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DictionaryOutputInfo { /** @@ -839,7 +868,8 @@ declare namespace zlib { * @type { ReturnStatus } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ status: ReturnStatus @@ -849,7 +879,8 @@ declare namespace zlib { * @type { int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ dictionaryLength: int } @@ -860,7 +891,8 @@ declare namespace zlib { * @typedef DecompressionOutputInfo * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DecompressionOutputInfo { /** @@ -869,7 +901,8 @@ declare namespace zlib { * @type { ReturnStatus } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ status: ReturnStatus @@ -879,7 +912,8 @@ declare namespace zlib { * @type { long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ destLength: long @@ -889,7 +923,8 @@ declare namespace zlib { * @type { long } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sourceLength: long } @@ -900,7 +935,8 @@ declare namespace zlib { * @typedef DeflatePendingOutputInfo * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DeflatePendingOutputInfo { /** @@ -909,7 +945,8 @@ declare namespace zlib { * @type { ReturnStatus } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ status: ReturnStatus @@ -919,7 +956,8 @@ declare namespace zlib { * @type { int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ pending: int @@ -929,7 +967,8 @@ declare namespace zlib { * @type { int } * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bits: int } @@ -981,6 +1020,21 @@ declare namespace zlib { */ type InflateBackInputCallback = (inDesc: object) => ArrayBuffer; + /** + * A callback function for reading input data provided by a user. When the decompression process requires more input data, + * zlib will call this function. This function should read data from the data source to the buffer. + * + * @typedef { function } + * @param { RecordData } inDesc - A universal user-defined data object. + * The specific type and content depend on the actual application scenario, which can include configuration data, file handles, etc. + * @returns { ArrayBuffer } Return the buffer successfully read by the data source through the input descriptor. + * @syscap SystemCapability.BundleManager.Zlib + * @atomicservice + * @since 22 + * @arkts 1.2 + */ + type InflateBackInputCallback = (inDesc: RecordData) => ArrayBuffer; + /** * The output data provided by the user is written into the callback function. Whenever decompressed data is ready for output, * zlib calls this function to write the data from the buffer to the target location. @@ -996,6 +1050,22 @@ declare namespace zlib { */ type InflateBackOutputCallback = (outDesc: object, buf: ArrayBuffer, length: int) => int; + /** + * The output data provided by the user is written into the callback function. Whenever decompressed data is ready for output, + * zlib calls this function to write the data from the buffer to the target location. + * + * @typedef { function } + * @param { RecordData } outDesc - Object passed to output function. Object dependency requirement implementation. + * @param { ArrayBuffer } buf - Used to store data to be written. + * @param { int } length - Write the length of the output buffer. + * @returns { int } Return the number of bytes output. + * @syscap SystemCapability.BundleManager.Zlib + * @atomicservice + * @since 22 + * @arkts 1.2 + */ + type InflateBackOutputCallback = (outDesc: RecordData, buf: ArrayBuffer, length: int) => int; + /** * Compress the specified file. * @@ -1270,7 +1340,8 @@ declare namespace zlib { * @returns { Promise } Returns zip objects. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function createZip(): Promise; @@ -1280,7 +1351,8 @@ declare namespace zlib { * @returns { Zip } Returns zip objects. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function createZipSync(): Zip; @@ -1422,7 +1494,8 @@ declare namespace zlib { * @typedef Zip * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Zip { /** @@ -1435,13 +1508,25 @@ declare namespace zlib { */ getZStream(): Promise; + /** + * Get ZStream. + * + * @returns { Promise } Return the required ZStream for compression or decompression. + * @syscap SystemCapability.BundleManager.Zlib + * @atomicservice + * @since 22 + * @arkts 1.2 + */ + getZStream(): Promise; + /** * Get the version information of the current linked zlib library. * * @returns { Promise } Returns a specific version number string constant containing the zlib library. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ zlibVersion(): Promise; @@ -1479,7 +1564,8 @@ declare namespace zlib { * 27-31: 0 (reserved). * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ zlibCompileFlags(): Promise; @@ -1495,7 +1581,8 @@ declare namespace zlib { * @throws { BusinessError } 17800007 - The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ compress(dest: ArrayBuffer, source: ArrayBuffer, sourceLen?: long): Promise; @@ -1513,7 +1600,8 @@ declare namespace zlib { * @throws { BusinessError } 17800007 - The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ compress2(dest: ArrayBuffer, source: ArrayBuffer, level: CompressLevel, sourceLen?: long,): Promise; @@ -1526,7 +1614,8 @@ declare namespace zlib { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ compressBound(sourceLen: int): Promise; @@ -1543,7 +1632,8 @@ declare namespace zlib { * @throws { BusinessError } 17800007 - The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ uncompress(dest:ArrayBuffer, source: ArrayBuffer, sourceLen?: long): Promise; @@ -1560,7 +1650,8 @@ declare namespace zlib { * @throws { BusinessError } 17800007 - The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ uncompress2(dest: ArrayBuffer, source: ArrayBuffer, sourceLen?: long): Promise; @@ -1575,7 +1666,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateValidate(strm: ZStream, check: int): Promise; @@ -1589,7 +1681,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateSyncPoint(strm: ZStream): Promise; @@ -1605,7 +1698,8 @@ declare namespace zlib { * @throws { BusinessError } 17800007 - The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateSync(strm: ZStream): Promise; @@ -1621,7 +1715,8 @@ declare namespace zlib { * @throws { BusinessError } 17800005 - The input data is incorrect. For example, the data does not conform to the zlib compression format, the compressed data is corrupted, or the data is not compressed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateSetDictionary(strm: ZStream, dictionary: ArrayBuffer): Promise; @@ -1635,7 +1730,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateResetKeep(strm: ZStream): Promise; @@ -1650,7 +1746,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateReset2(strm: ZStream, windowBits: int): Promise; @@ -1664,7 +1761,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateReset(strm: ZStream): Promise; @@ -1680,7 +1778,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflatePrime(strm: ZStream, bits: int, value: int): Promise; @@ -1693,7 +1792,8 @@ declare namespace zlib { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateMark(strm: ZStream): Promise; @@ -1725,7 +1825,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateInit2(strm: ZStream, windowBits: int): Promise; @@ -1738,7 +1839,8 @@ declare namespace zlib { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateInit(strm: ZStream): Promise; @@ -1753,7 +1855,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateGetHeader(strm: ZStream, header: GzHeader): Promise; @@ -1768,7 +1871,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateGetDictionary(strm: ZStream, dictionary: ArrayBuffer): Promise; @@ -1782,7 +1886,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateEnd(strm: ZStream): Promise; @@ -1796,7 +1901,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateCopy(source: Zip): Promise; @@ -1809,7 +1915,8 @@ declare namespace zlib { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateCodesUsed(strm: ZStream): Promise; @@ -1825,7 +1932,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateBackInit(strm: ZStream, windowBits: long, window: ArrayBuffer): Promise; @@ -1839,7 +1947,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflateBackEnd(strm: ZStream): Promise; @@ -1861,6 +1970,25 @@ declare namespace zlib { */ inflateBack(strm: ZStream, backIn: InflateBackInputCallback, inDesc: object, backOut: InflateBackOutputCallback, outDesc: object): Promise; + /** + * Does a raw inflate with a single call using a call-back interface for input and output. + * + * @param { ZStream } strm - Object to structure z_stream. + * @param { InflateBackInputCallback } backIn - A function that decompresses data from the end to read the raw + * compressed data from the input source. + * @param { RecordData } inDesc - Universal object. + * @param { InflateBackOutputCallback } backOut - Write the decompressed data to the target output. + * @param { RecordData } outDesc - Universal object. + * @returns { Promise } Return ReturnStatus the specific meaning is defined as enum. + * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by + * an initialization error in the zlib stream structure or a modified structure. + * @syscap SystemCapability.BundleManager.Zlib + * @atomicservice + * @since 22 + * @arkts 1.2 + */ + inflateBack(strm: ZStream, backIn: InflateBackInputCallback, inDesc: RecordData, backOut: InflateBackOutputCallback, outDesc: RecordData): Promise; + /** * Decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. * @@ -1873,7 +2001,8 @@ declare namespace zlib { * @throws { BusinessError } 17800005 - The input data is incorrect. For example, the data does not conform to the zlib compression format, the compressed data is corrupted, or the data is not compressed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inflate(strm: ZStream, flush: CompressFlushMode): Promise; @@ -1888,7 +2017,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateInit(strm: ZStream, level: CompressLevel): Promise; @@ -1907,7 +2037,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateInit2(strm: ZStream, level: CompressLevel, method: CompressMethod, windowBits: int, memLevel: MemLevel, strategy: CompressStrategy): Promise; @@ -1924,7 +2055,8 @@ declare namespace zlib { * @throws { BusinessError } 17800007 - The input buffer is incorrect, and the output buffer is too small to accommodate the compressed or decompressed data. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflate(strm: ZStream, flush: CompressFlushMode): Promise; @@ -1938,7 +2070,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateEnd(strm: ZStream): Promise; @@ -1952,7 +2085,8 @@ declare namespace zlib { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateBound(strm: ZStream, sourceLength: long): Promise; @@ -1967,7 +2101,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateSetHeader(strm: ZStream, head: GzHeader): Promise; @@ -1981,7 +2116,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateCopy(source: Zip): Promise; @@ -1996,7 +2132,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateSetDictionary(strm: ZStream, dictionary: ArrayBuffer): Promise; @@ -2011,7 +2148,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateGetDictionary(strm: ZStream, dictionary: ArrayBuffer): Promise; @@ -2029,7 +2167,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateTune(strm: ZStream, goodLength: int, maxLazy: int, niceLength: int, maxChain: int): Promise; @@ -2043,7 +2182,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateReset(strm: ZStream): Promise; @@ -2057,7 +2197,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateResetKeep(strm: ZStream): Promise; @@ -2071,7 +2212,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflatePending(strm: ZStream): Promise; @@ -2087,7 +2229,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflateParams(strm: ZStream, level: CompressLevel, strategy: CompressStrategy): Promise; @@ -2103,7 +2246,8 @@ declare namespace zlib { * @throws { BusinessError } 17800004 - Compression or decompression stream error, which may be caused by an initialization error in the zlib stream structure or a modified structure. * @syscap SystemCapability.BundleManager.Zlib * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deflatePrime(strm: ZStream, bits: int, value: int): Promise; } -- Gitee