Created
July 22, 2015 13:55
-
-
Save yannick/0d48dc1411be9d7050bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.stdio; | |
| import std.string; | |
| import std.zlib; | |
| void main(){ | |
| string bla = "VERYLONGSTRING"; | |
| auto compressed = std.zlib.compress(cast(void[]) cast(ubyte[])bla); | |
| writeln(compressed); | |
| writeln(compressed.length); | |
| writeln("----"); | |
| auto uncomp = cast(string)std.zlib.uncompress(cast(void[])compressed); | |
| writeln(uncomp); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment