提交 05b4e5ca 编写于 作者: E ester.zhou

update doc

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 6e676c15
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
## Constraints ## Constraints
None None
## Modules to Import ## Modules to Import
import zlib from '@ohos.zlib'
```javascript
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.
...@@ -134,7 +137,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => { ...@@ -134,7 +137,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
| 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 |
| --------------------------------------- | ----------------- | | --------------------------------------- | ----------------- |
...@@ -143,7 +146,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => { ...@@ -143,7 +146,7 @@ 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 |
| -------------------------------------- | ------------------------ | | -------------------------------------- | ------------------------ |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册