[Pas2js] TStream implementation committed
Michael Van Canneyt
michael at freepascal.org
Wed Jun 19 10:00:22 CEST 2019
Hello,
I have implemented TStream.
The latest delphis (and FPC) have added methods to TStream which read/write
TBytes instead of a memory buffer. It is possible to implement such a call
in pas2js (which has no arbitrary memory buffer). They also added some basic
ReadData(Buffer)/WriteData(Buffer) calls which read/write some basic types
(integers and a float). These can be ported as well.
This means that if you write your stream handling using these new methods, you can
use TStream both natively and in pas2js.
Currently the only available stream is TBytesStream, but I expect to have
streams based on the various lower-level javascript TTypedArray classes
available soon.
The next steps include also implementing the component streaming classes,
and 'resource' support for pas2js.
Michael.
More information about the Pas2js
mailing list