How can I
use asynchronous convertors.
I created one listener with three
functions(onStartRequest, onStopRequest, onDataAvailable).
After that I created streamconvertor in
onDataAvilable function.
var streamConv =
Components.classes["@mozilla.org/streamconv;1?from=gzip&to=uncompressed"].createInstance(Components.interfaces.nsIStreamConverter);
var ret =
streamConv.asyncConvertData("gzip", "uncompressed", mylistener,
null);
But how I would pass stream which I
want to convert ???
Is I am doing right ?? or I need to do
something else.
thanks,
Hitesh.
Hitesh Khamesra wrote:
> var streamConv = Components.classes["@mozilla.org/streamconv;1?from=gzip&to=uncompressed"].createInstance(Components.interfaces.nsIStreamConverter); I kinda intentionally suggested the stream converter service... > var ret = streamConv.convert(inputStream, "gzip", "uncompressed", null); Looks like the gzip stream converter only supports asynchronous conversion. Maybe you should file a bug/RFE on that. |
- If data in gzip or other format Hitesh Khamesra
- Re: If data in gzip or other format Christian Biesinger
- Re: If data in gzip or other format Hitesh Khamesra
- Re: If data in gzip or other format Christian Biesinger
- Re: If data in gzip or other format Hitesh Khamesra
- Re: If data in gzip or other format Christian Biesinger
- Re: If data in gzip or other format Hitesh Khamesra