What is the prefered method for creating a byte array from an input stream in intersystems' cache. The method I have tried is to first read the entire file im memory then extract one byte at a time and assign the value to an incremental array
1 Answers
1
votes
- Open file as stream using
%Stream.FileBinary
- Read part/all of the stream into incremental array.
Note: reading the file by big chunks (use $$$MaxLocalLength) into string and then building an incremental array would be faster than reading symbol by symbol) Here's a good example.
Note2: InterSystems Caché can work with bitstrings. Documentation.
What do you want to do with that?