We can!

>We can certainly emulate:
>
>       port: open/binary/direct/skip ...
>
>with
>
>       port: open/binary/direct ...
>       copy/part port ...
>
>  
>
  skip-bytes: func
  [
    {Skips a number of bytes on an open port, to work around the
    open/binary/direct skip bug. THIS SHOULDN'T BE NEEDED!!!}
    p [port!] {The port to skip on}
    i [integer!] {The number of bytes to skip}
    /local ofz rem-off
  ]
  [
    rem-off: i
    until
    [
      ofz: either rem-off > 100000 [ 100000 ][rem-off]
      copy/part p ofz
      rem-off: rem-off - ofz
      0 >= ofz
    ]
    return p
  ]

is what I am using in Rebletta, the webserver I'm developing. Here, mem 
usage is still low and it skips 100Mb in 0.7 secs (2.2 Ghz PC with WinXP)
Which is slower that a skip would be, but workable for now.

--Maarten
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to