M Mike1970 Well-Known Member Licensed User Longtime User Jun 6, 2022 #1 Hi everyone, i'm trying to porting some javascript (react) code into B4A, but the data.slice(from, to) function is used to create blocks of 512bytes from a larger file. What is the equivalent in B4X? Thanks in advance
Hi everyone, i'm trying to porting some javascript (react) code into B4A, but the data.slice(from, to) function is used to create blocks of 512bytes from a larger file. What is the equivalent in B4X? Thanks in advance
Erel B4X founder Staff member Licensed User Longtime User Jun 6, 2022 #2 There isn't enough information here. If the file is not too large then you can read it completely with File.ReadBytes, add the bytes to B4XBytesBuilder and use SubArray2 to slice it. Upvote 0
There isn't enough information here. If the file is not too large then you can read it completely with File.ReadBytes, add the bytes to B4XBytesBuilder and use SubArray2 to slice it.
M Mike1970 Well-Known Member Licensed User Longtime User Jun 6, 2022 #3 Erel said: There isn't enough information here. If the file is not too large then you can read it completely with File.ReadBytes, add the bytes to B4XBytesBuilder and use SubArray2 to slice it. Click to expand... Thanks, actually the only thing i was looking for was how to create smaller blocks of bytes from a file (900KB). You got the point, i will try asap. Upvote 0
Erel said: There isn't enough information here. If the file is not too large then you can read it completely with File.ReadBytes, add the bytes to B4XBytesBuilder and use SubArray2 to slice it. Click to expand... Thanks, actually the only thing i was looking for was how to create smaller blocks of bytes from a file (900KB). You got the point, i will try asap.