<div dir="ltr"><div dir="ltr">On Wed, Jun 19, 2019 at 5:00 AM Michael Van Canneyt <<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hello,<br>
<br>
I have implemented TStream.<br></blockquote><div><br></div><div>You have done a great job!</div><div><br></div><div>The best thing about open source is that when we least expect, it surprised us by incredible works. :-)<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The latest delphis (and FPC) have added methods to TStream which read/write<br>
TBytes instead of a memory buffer. It is possible to implement such a call<br>
in pas2js (which has no arbitrary memory buffer). They also added some basic<br>
ReadData(Buffer)/WriteData(Buffer) calls which read/write some basic types<br>
(integers and a float). These can be ported as well.<br>
<br>
This means that if you write your stream handling using these new methods, you can<br>
use TStream both natively and in pas2js.<br>
<br>
Currently the only available stream is TBytesStream, but I expect to have<br>
streams based on the various lower-level javascript TTypedArray classes<br>
available soon.<br>
<br>
The next steps include also implementing the component streaming classes,<br>
and 'resource' support for pas2js.<br>
<br>
Michael.</blockquote><div> </div><div>-- </div></div><div dir="ltr" class="m_-7233652967368932035gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div></div>