File tree 6 files changed +295
-283
lines changed
6 files changed +295
-283
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.0.2
2
+
3
+ * Make compression and decompression asynchronous
4
+
1
5
## 1.0.1+2
2
6
3
7
* Update document comments
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ The original JavaScript version is [here](https://github.com/pieroxy/lz-string)
7
7
8
8
## Usage
9
9
``` dart
10
- String compressedString = LZString.compress('Some String');
11
- String decompressedString = LZString.decompress(compressedString);
10
+ Future< String> compressedString = LZString.compress('Some String');
11
+ Future< String> decompressedString = LZString.decompress(compressedString);
12
12
```
13
13
For more usage, please read the exapmle in [ example] ( https://github.com/skipness/lzstring-dart/tree/master/example ) folder
14
14
Original file line number Diff line number Diff line change 1
1
import 'package:lzstring/lzstring.dart' ;
2
2
3
- void main () {
3
+ void main () async {
4
4
String input = "Dart implemntation of lz-string" ;
5
5
print ('Input: $input ' );
6
- print ('Compressed String: ${LZString .compress (input )}' );
7
- print ('Compressed Base 64 String: ${LZString .compressToBase64 (input )}' );
8
- print ('Compressed UTF16 String: ${LZString .compressToUTF16 (input )}' );
6
+ print ('Compressed String: ${await LZString .compress (input )}' );
7
+ print ('Compressed Base 64 String: ${await LZString .compressToBase64 (input )}' );
8
+ print ('Compressed UTF16 String: ${await LZString .compressToUTF16 (input )}' );
9
9
print (
10
- 'Compressed Encoded URI Component: ${LZString .compressToEncodedURIComponent (input )}' );
11
- print ('Compressed Uint8 Array: ${LZString .compressToUint8Array (input )}' );
10
+ 'Compressed Encoded URI Component: ${await LZString .compressToEncodedURIComponent (input )}' );
11
+ print ('Compressed Uint8 Array: ${await LZString .compressToUint8Array (input )}' );
12
12
}
You can’t perform that action at this time.
0 commit comments