Page 1 of 2
PureBin2Data
Posted: Tue Dec 13, 2005 12:26 am
by ts-soft
What does this tool?
- converts any binary file (up to 64MB) into a PureBasic DataSection
- compresses the DataSection (selectable JCalG1 or BriefLZ)
Why?
- smaller filesize
- sharing complete sourcecode
- posting source in boards
- makes it more difficult to steal own picture- and/or soundfiles
http://www.purebasic.ts-soft-online.de/ ... n2data.zip
Posted: Tue Dec 13, 2005 6:00 am
by J. Baker
Wow, very nice but I haven't tried it yet, just sounds good. So if this is possible... then wouldn't it be possible to load a binary file into memory, using the same methods, somewhat? Cheers and I'll try it soon.
EDIT
Let me refrase that. I see your program uses memory for it to work. My question is, would it be possible to run a binary that has been already included into an exe from memory using the method you use.
(example) Compile your source with a binary file using the include function. Then at runtime, this included binary gets converted to data to be ran from memory.
I asked this question some time back on the forum but I don't think anyone knew how at the time. Now seeing your post, it seems possible.
Posted: Tue Dec 13, 2005 7:50 am
by ts-soft
thx,
to use a exe file from DataSection, you must write the unpacked Data to harddisk. i have no way to run exe from memory.
This is the same function as includebinary, only in DataSection.
Posted: Wed Dec 14, 2005 2:41 am
by okasvi
viewtopic.php?t=11064&highlight=loadexe
there you go...
edit: if someone manages to make it work without compiling the POC as .obj and using dirty little tricks to include it into PB code, I would like to see the converted code

Posted: Sun Jan 15, 2006 3:52 am
by SFSxOI
Where is this at? I couldnt find it at the links posted.
Posted: Sun Jan 15, 2006 5:50 am
by Dare2
looks good.
However, the purearea download page has gone into a refresh frenzy.
It won't give the file (to Mozilla) and the "here" link is empty: {A href=""}
Any other link?
Thanks.
Posted: Sun Jan 15, 2006 9:58 am
by ts-soft
Sorry, new Version with new Download, first Post corrected
Posted: Fri Jan 20, 2006 2:02 pm
by Psychophanta
ts-soft wrote:What does this tool?
- converts any binary file (up to 64MB) into a PureBasic DataSection
- compresses the DataSection (selectable JCalG1 or BriefLZ)
This tool is really great!!
Ts-soft, when selecting cmpression method it simply doesn't obey. I think it reads from the .ini file instead of gadgets.
Re: PureBin2Data
Posted: Fri Jan 20, 2006 2:07 pm
by NoahPhense
Very nice. Gotta play with this one..
- np
Posted: Fri Jan 20, 2006 2:36 pm
by ts-soft
Psychophanta wrote:
Ts-soft, when selecting cmpression method it simply doesn't obey. I think it reads from the .ini file instead of gadgets.
Select compression before Drop the File on GUI.
In Shell you can give 2 Parameters. With 1 Parameters, it's use the last GUI selection (stored in ini-file).
thx
Posted: Fri Jan 20, 2006 3:46 pm
by Psychophanta
Grrr, now it works as it must.
I am drunk or what?
Well, then, please add a warning before overwrite same named file.

Posted: Fri Jan 20, 2006 4:47 pm
by ts-soft
Psychophanta wrote:
Well, then, please add a warning before overwrite same named file.

Okay, Version 1.6.1.20 with Warning
Posted: Fri Jan 20, 2006 6:05 pm
by NoahPhense
See if you can get this built-in to PB .. It can be a valuable tool.
- np
Posted: Fri Jan 20, 2006 6:07 pm
by Psychophanta
NoahPhense wrote:See if you can get this built-in to PB .. It can be a valuable tool.
Yes! I think so!
Ts-soft, another suggestion: Would be good to be able to choose between leave the data as HEX or DEC,

Posted: Fri Jan 20, 2006 6:15 pm
by ts-soft
Psychophanta wrote:
Ts-soft, another suggestion: Would be good to be able to choose between leave the data as HEX or DEC,

Why, for your eyes
I will make a Tool with HEX and script for RC-Files (Windows-Resources) in future, i hope