View Full Version : Binary file into string, then back
Is it possible to load a binary file into string in APMS,
and then write it back to some other file?
Brett
02-09-2006, 10:00 AM
What sort of string do you want it in? Do you want to use String actions on it? Do you want to show it on the screen? Or do you just want to read from one file and write to another?
Lua's built-in io library supports reading binary files to a string. In Lua strings are not NULL-terminated so they can actually store non-ASCII bytes.
Basically I want to, for example, throw .jpg into MySQL's BLOB field, and be able to retrieve it.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.