Skip to content

Commit 5798b88

Browse files
committed
master
1 parent ad45220 commit 5798b88

File tree

6 files changed

+389
-387
lines changed

6 files changed

+389
-387
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
# Zipack.JS
1+
# Zspack
22

3-
Live demo: https://zipack.github.io/#demo
3+
Live demo: https://zspack.github.io/#demo
44

5-
Zipack.js is an official encoder/decoder of [Zipack](https://zipack.github.io/) format using JavaScript with no dependencies.
5+
Zspack = zipack + [scsu](https://en.wikipedia.org/wiki/Standard_Compression_Scheme_for_Unicode) , hack for Zipack.js
6+
7+
Zipack.js is an official encoder/decoder of [Zipack](https://zspack.github.io/) format using JavaScript with no dependencies.
68

79
## Install
810

911
```shell
10-
npm install zipack-official
12+
npm install zspack
1113
```
1214

1315
Use ES module in browser or Node.JS:
1416

1517
```JavaScript
16-
import zipack from 'zipack.js'
18+
import * as zspack from from 'zspack'
1719
```
1820

1921
Prototype:
2022

2123
```
22-
zipack {
24+
zspack {
2325
dump(Object) // code
2426
load(Buffer) // decode
2527
}
2628
```
2729

2830
## Default JS Objects
2931

30-
the types zipack support by default:
32+
the types zspack support by default:
3133

3234
- number
3335
- string
@@ -52,29 +54,29 @@ let obj = {
5254
}
5355

5456
// JS Object ---> Uint8Array
55-
let buffer = zipack.dump(obj)
57+
let buffer = zspack.dump(obj)
5658

5759
// Uint8Array ---> JS Object
58-
obj = zipack.load(buffer)
60+
obj = zspack.load(buffer)
5961
```
6062

61-
## [Object].prototype.zipack
63+
## [Object].prototype.zspack
6264

63-
like toJSON() in JavaScript, define zipack() for specific Objects, which outputs the types zipack support. For example, Date could be stored as number:
65+
like toJSON() in JavaScript, define zspack() for specific Objects, which outputs the types zspack support. For example, Date could be stored as number:
6466

65-
- function:zipack
67+
- function:zspack
6668
- input:none
6769
- output:default types or Uint8Array
6870

6971
```javascript
70-
Date.prototype.zipack = function () {
72+
Date.prototype.zspack = function () {
7173
return this.getTime();
7274
};
7375
```
7476

7577
## Extension (experimental)
7678

77-
Register callback(params: Uint8Array) to load zipack, meanwhile, define zipack() returning Uint8Array to dump. See [extend-demo.js](./extend_demo.js).
79+
Register callback(params: Uint8Array) to load zspack, meanwhile, define zspack() returning Uint8Array to dump. See [extend-demo.js](./extend_demo.js).
7880

7981
## License
8082

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
2-
"name": "@zipack/zipack",
2+
"name": "zspack",
33
"version": "0.0.1",
4-
"description": "Zipack.js is an official encoder/decoder of Zipack format using JavaScript with no dependencies",
5-
"main": "zipack.js",
4+
"description": "Zipack.js + scsu",
5+
"main": "zspack.js",
66
"scripts": {},
77
"publishConfig": {
88
"registry": "https://registry.npmjs.org/"
99
},
1010
"repository": {
1111
"type": "git",
12-
"url": "git+https://github.com/zipack/zipack-javascript.git"
12+
"url": "git+https://github.com/rmw-lib/zspack.git"
1313
},
1414
"author": "Jim",
1515
"license": "Apache-2.0",
1616
"bugs": {
17-
"url": "https://github.com/zipack/zipack-javascript/issues"
17+
"url": "https://github.com/rmw-lib/zspack/issues"
1818
},
19-
"homepage": "https://github.com/zipack/zipack-javascript#readme",
19+
"homepage": "https://github.com/rmw-lib/zspack#readme",
2020
"keywords": [
21-
"zipack"
21+
"zipack",
22+
"zspack"
2223
],
2324
"type": "module",
2425
"devDependencies": {

0 commit comments

Comments
 (0)