Suggest a Feature

Share your requests for new features, channels, etc. with the Roku team! Search keywords and add a kudo to an existing topic to show your support, or create a new topic if your suggestion isn't listed.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rokenbuzz
Level 7

Improve ifArray.Append


feature request on Slack 

Add a start_pos and length parameter to ifArray.Append, like ifByteArray.AppendFile has, so we can choose a length of bytes from within an array to append onto another. The work around to use AppendFile and then read the file back into an array is odd and likely slower.

0 Kudos
1 REPLY 1\
rokenbuzz
Level 7

Re: Improve ifArray.Append

I continue to encounter this missing functionality and it pains me. I feel like it's a necessity for an app that needs to manipulate raw data. The implementation in the API should be easy.

Here is a documented C# analog in case it's not clear what I'm looking for:
C# Array.Copy 
I figure you'd just update Append though.

Today in BrightScript, how would you copy some part of one byte array into another?
Yes you can write your own function in Brightscript but this runs insanely slow compared to a memcpy that could be done under the hood. My application is needing to reformat an incoming stream of data so I need to copy chunks from one byte into another, at a rate that a user defined function can't keep up with.

Can this functionality be added to the API? 

0 Kudos