未验证 提交 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
```javascript
import zlib from '@ohos.zlib';
```
## zlib.zipFile
zipFile(inFile:string, outFile:string, options: Options): Promise<void>;
Zips a file. This API uses a promise to return the result.
......@@ -124,7 +125,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
## options
| Name | |
| Name | Description |
| --------------------------- | ------------------------------------------------------------ |
| level?: CompressLeve | See [zip.CompressLevel](#zip.CompressLevel).|
| memLevel?: MemLevel | See [zip.MemLevel](#zip.MemLevel) |
......@@ -132,12 +133,13 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
## 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_DEFAULT | Default memory used by the **zip** API during compression.|
## zip.CompressLevel
## Zip.CompressLevel
| Name | Description |
| --------------------------------------- | ----------------- |
......@@ -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_DEFAULT_COMPRESSION : -1| Default compression level. |
## zip.CompressStrategy
## Zip.CompressStrategy
| Name | Description |
| -------------------------------------- | ------------------------ |
| COMPRESS_STRATEGY_DEFAULT_STRATEGY : 0 | Default compression strategy. |
| COMPRESS_STRATEGY_FILTERED : 1 | Filtered 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. |
## zip.ErrorCode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册