Inflate for Stream

Does it possible to inflate (uncompress() function) a part of file compressed with deflate function compress()?

Obviously, Flash Player can do it so it loads compressed swf files (CWS) as a stream. But uncompress() function fails if the file length is less then full data length or one byte is wrong…

Possible some changes in data header? It uses some different format, similar, but not fully equivalent to original deflate format (RFC1951).