未验证 提交 c9cf1371 编写于 作者: O openharmony_ci 提交者: Gitee

!2906 Done! 2531: modified: zh-cn/application-dev/reference/apis/js-apis-zlib.md

Merge pull request !2906 from wusongqing/TR2531
...@@ -7,6 +7,7 @@ None ...@@ -7,6 +7,7 @@ None
```javascript ```javascript
import zlib from '@ohos.zlib'; import zlib from '@ohos.zlib';
``` ```
## zlib.zipFile ## zlib.zipFile
zipFile(inFile:string, outFile:string, options: Options): Promise<void>; zipFile(inFile:string, outFile:string, options: Options): Promise<void>;
Zips a file. This API uses a promise to return the result. Zips a file. This API uses a promise to return the result.
...@@ -124,7 +125,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => { ...@@ -124,7 +125,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
## options ## options
| Name | | | Name | Description |
| --------------------------- | ------------------------------------------------------------ | | --------------------------- | ------------------------------------------------------------ |
| level?: CompressLeve | See [zip.CompressLevel](#zip.CompressLevel).| | level?: CompressLeve | See [zip.CompressLevel](#zip.CompressLevel).|
| memLevel?: MemLevel | See [zip.MemLevel](#zip.MemLevel) | | memLevel?: MemLevel | See [zip.MemLevel](#zip.MemLevel) |
...@@ -132,12 +133,13 @@ zlib.unzipFile(inFile, outFile, options).then((data) => { ...@@ -132,12 +133,13 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
## zip.MemLevel ## zip.MemLevel
| MEM_LEVEL_MIN | Minimum memory used by the **zip** API during compression.| | Name | Description |
| ----------------- | -------------------------------- | | ----------------- | -------------------------------- |
| MEM_LEVEL_MIN | Minimum memory used by the **zip** API during compression.|
| MEM_LEVEL_MAX | Maximum memory used by the **zip** API during compression.| | MEM_LEVEL_MAX | Maximum memory used by the **zip** API during compression.|
| MEM_LEVEL_DEFAULT | Default memory used by the **zip** API during compression.| | MEM_LEVEL_DEFAULT | Default memory used by the **zip** API during compression.|
## zip.CompressLevel ## Zip.CompressLevel
| Name | Description | | Name | Description |
| --------------------------------------- | ----------------- | | --------------------------------------- | ----------------- |
...@@ -146,14 +148,14 @@ zlib.unzipFile(inFile, outFile, options).then((data) => { ...@@ -146,14 +148,14 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
| COMPRESS_LEVEL_BEST_COMPRESSION :9 | Compression level 9 that gives the best compression. | | COMPRESS_LEVEL_BEST_COMPRESSION :9 | Compression level 9 that gives the best compression. |
| COMPRESS_LEVEL_DEFAULT_COMPRESSION : -1| Default compression level. | | COMPRESS_LEVEL_DEFAULT_COMPRESSION : -1| Default compression level. |
## zip.CompressStrategy ## Zip.CompressStrategy
| Name | Description | | Name | Description |
| -------------------------------------- | ------------------------ | | -------------------------------------- | ------------------------ |
| COMPRESS_STRATEGY_DEFAULT_STRATEGY : 0 | Default compression strategy. | | COMPRESS_STRATEGY_DEFAULT_STRATEGY : 0 | Default compression strategy. |
| COMPRESS_STRATEGY_FILTERED : 1 | Filtered compression strategy.| | COMPRESS_STRATEGY_FILTERED : 1 | Filtered compression strategy.|
| COMPRESS_STRATEGY_HUFFMAN_ONLY : 2 | Huffman coding compression strategy. | | COMPRESS_STRATEGY_HUFFMAN_ONLY : 2 | Huffman coding compression strategy. |
| OMPRESS_STRATEGY_RLE : 3 | RLE compression strategy. | | COMPRESS_STRATEGY_RLE : 3 | RLE compression strategy. |
| COMPRESS_STRATEGY_FIXED : 4 | Fixed compression strategy. | | COMPRESS_STRATEGY_FIXED : 4 | Fixed compression strategy. |
## zip.ErrorCode ## zip.ErrorCode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册