Skip to content

Commit 873d7dc

Browse files
committed
Move Gzip test to an example
1 parent 06c5def commit 873d7dc

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

example/Gzip.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* global exports */
2+
/* global require */
3+
"use strict";
4+
5+
// module Gzip
6+
7+
exports.gzip = require('zlib').createGzip;

example/Gzip.purs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module Gzip where
2+
3+
import Prelude
4+
5+
import Node.Stream
6+
import Node.Stream.StdIO
7+
8+
import Control.Monad.Eff
9+
import Control.Monad.Eff.Console
10+
11+
foreign import data GZIP :: !
12+
13+
foreign import gzip :: forall eff. Eff (gzip :: GZIP | eff) (Duplex (gzip :: GZIP | eff))
14+
15+
foreign import
16+
17+
main = do
18+
z <- gzip
19+
stdin `pipe` z
20+
z `pipe` stdout

0 commit comments

Comments
 (0)