Created
July 22, 2015 13:42
-
-
Save yannick/40f959e0e97d7bd0c626 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 comp = new Compress(HeaderFormat.gzip); | |
| auto compressed = comp.compress(cast(byte[])bla); | |
| compressed ~= comp.flush(); | |
| writeln(compressed); | |
| writeln(compressed.length); | |
| writeln("----"); | |
| UnCompress uncompressObj = new UnCompress(); | |
| string uncomp = cast(string)uncompressObj.uncompress(compressed); | |
| writeln(uncomp); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment