Modify

Opened 11 years ago

Closed 11 years ago

#2655 closed Feature Request (Rejected)

FileReadToArray and binary file

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

whether it is possible to do so FileReadToArray return bytes instead of strings for files, open with option $FO_BINARY (16)?

Attachments (0)

Change History (6)

comment:1 Changed 11 years ago by TicketCleanup

  • Version 3.3.10.2 deleted

Automatic ticket cleanup.

comment:2 Changed 11 years ago by jchd18

This is a very limited syntactic sugar. You can already do that in a few lines of code and without size limit. Remember that AutoIt arrays are limited to 16*1024*1024 = 16777216 cells, so you could only read that many bytes of a file using your suggestion.

comment:3 Changed 11 years ago by anonymous

jchd18, well, what of it that arrays are limited? Everyone knows, however filereadtoarray function exists. Your comment can simply display help for this function.

comment:4 Changed 11 years ago by jchd18

Text files containing more than 16777216 lines are fairly uncommon. Accumulating log data in large log files is easy by appending, but routine processing of such large data is best done using a database. Thus FileReadToArray seems to fit the bill decently.

OTOH binary files > 16 Mb are plenty and the need to address every byte individually in one load is questionnable.

From Language Reference - Arrays:
You can use up to 64 dimensions in an Array. The total number of entries cannot be greater than 224 (16 777 216).

comment:5 Changed 11 years ago by anonymous

jchd18, you're right :( Can then still an option, the number of bytes to the index ...
But I think that's another function is obtained ...

comment:6 Changed 11 years ago by guinness

  • Resolution set to Rejected
  • Status changed from new to closed

Create your own wrapper function using the already available functions in AutoIt.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.