Mercurial > projects > dwt-linux
comparison dwt/dwthelper/InflaterInputStream.d @ 363:5f6d9bb33a53
merge
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 04 Apr 2009 21:38:37 +0200 |
parents | 5b585873fec2 4bffbf81e2d6 |
children |
comparison
equal
deleted
inserted
replaced
362:5b585873fec2 | 363:5f6d9bb33a53 |
---|---|
3 */ | 3 */ |
4 module dwt.dwthelper.InflaterInputStream; | 4 module dwt.dwthelper.InflaterInputStream; |
5 | 5 |
6 public import dwt.dwthelper.InputStream; | 6 public import dwt.dwthelper.InputStream; |
7 import dwt.dwthelper.utils; | 7 import dwt.dwthelper.utils; |
8 import tango.io.Stdout; | |
9 import tango.io.compress.ZlibStream; | 8 import tango.io.compress.ZlibStream; |
10 version(Windows){ | 9 version(Windows){ |
11 version(build){ | 10 version(build){ |
12 pragma(link,"zlib"); | 11 pragma(link,"zlib"); |
13 } | 12 } |
24 | 23 |
25 uint read (void[] dst){ | 24 uint read (void[] dst){ |
26 int res = istr.read( cast(byte[])dst ); | 25 int res = istr.read( cast(byte[])dst ); |
27 return res; | 26 return res; |
28 } | 27 } |
29 void[] load (void[] dst = null) { | 28 |
30 return Conduit.load (this, dst); | 29 IOStream flush () { |
30 return this; | |
31 } | |
32 | |
33 void[] load ( size_t max = -1 ) { | |
34 return Conduit.load (this, max); | |
31 } | 35 } |
32 | 36 |
33 tango.io.model.IConduit.InputStream clear (){ | 37 tango.io.model.IConduit.InputStream clear (){ |
34 return this; | 38 return this; |
35 } | 39 } |
36 | 40 |
37 long seek ( long offset, IOStream.Anchor anchor = IOStream.Anchor.Begin ) | |
38 { | |
39 throw new IOException(__FILE__ ~ "seek method not implemented"); | |
40 } | |
41 | |
42 tango.io.model.IConduit.IConduit conduit (){ | 41 tango.io.model.IConduit.IConduit conduit (){ |
43 return null; | 42 return null; |
44 } | 43 } |
45 | 44 |
46 void close (){ | 45 void close (){ |
47 istr.close(); | 46 istr.close(); |
48 } | 47 } |
49 | 48 tango.io.model.IConduit.InputStream input (){ |
50 tango.io.model.IConduit.InputStream input() { | 49 return null; |
51 return this; //?? | 50 } |
51 long seek (long offset, Anchor anchor = Anchor.Begin){ | |
52 return 0; | |
52 } | 53 } |
53 } | 54 } |
54 | 55 |
55 public class InflaterInputStream : dwt.dwthelper.InputStream.InputStream { | 56 public class InflaterInputStream : dwt.dwthelper.InputStream.InputStream { |
56 | 57 |