[Pas2js] TStream implementation committed
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Jun 20 10:55:43 CEST 2019
On Wed, 19 Jun 2019 10:00:22 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:
>[...]
> I have implemented TStream.
Fantastic! Many thought it wouldn't fit into pas2js.
> 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.
I added it to the changes list:
https://wiki.freepascal.org/Pas2JS_Version_Changes#Trunk
> The next steps include also implementing the component streaming
> classes, and 'resource' support for pas2js.
Mattias
More information about the Pas2js
mailing list