It is currently Wed Mar 27, 2019 2:12 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Wed Feb 15, 2012 10:19 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5751
Location: Berlin - Germany
Description:
Small Drop-GUI to convert all binfiles to DataSection.
Preview of Pictures, Sounds can be played.
This tool should help you to post your sources without
dependencies, in this forum.
It's not designed to work with big files.
Tested on linux,macos and windows

Have fun

The source is to large, to post it here,
please download at: http://dl.dropbox.com/u/3086026/Bin2Data.pb

A version with better packsupport, but requires PB5.10 + can you found here:
viewtopic.php?p=411891#p411891

// added screenshot:
Image

Historie wrote:
; V1.1z 2012/02/19
; version modified by Wilbert.
; - different handling of data generation
; - added control of quads per line
; - added zlib compression option
;
; V1.1, 2012/02/16
; small bugfix with drop folder or empty files
;
; V1.0, 2012/02/15
; Initial release

_________________
PureBasic 5.70 | SpiderBasic 2.21 | Windows 10 Pro (x64) | Linux Mint 19.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Last edited by ts-soft on Sat Apr 27, 2013 10:33 am, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Wed Feb 15, 2012 11:06 pm 
Online
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 2860
Location: Boston, MA
Too Cool! 8)

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Wed Feb 15, 2012 11:41 pm 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
Mr Soft, your contributions are outstanding.


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Thu Feb 16, 2012 1:20 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5780
Location: Wales, UK
Well, it does work OK with large files too, just leave to run during a coffee break. Took just over a minute to process an 886KB file (producing 22705 data lines!). So, kudos ts-soft. :wink:

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Thu Feb 16, 2012 5:39 am 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5751
Location: Berlin - Germany
I thank you for the feedback

Update:
historie wrote:
V 1.1, 2012/02/16
small bugfix with drop folder or empty files

_________________
PureBasic 5.70 | SpiderBasic 2.21 | Windows 10 Pro (x64) | Linux Mint 19.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Last edited by ts-soft on Thu Feb 16, 2012 6:06 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Thu Feb 16, 2012 5:58 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3491
Location: Berlin, Germany
Very nice, Thomas. I need it right now. :-)

Thank you, LJ

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Thu Feb 16, 2012 9:14 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 14, 2007 2:13 am
Posts: 979
Location: Darling River
Just what the doctor ordered.
Thank You! :)

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Thu Feb 16, 2012 2:06 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Apr 25, 2005 9:28 pm
Posts: 700
Location: $300:20 58 FC 60 - Vietnam
Another awesome contribution of ts-soft :wink:
Thanks a lot :mrgreen:

_________________
“Fear is a reaction. Courage is a decision.” - WC


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Thu Feb 16, 2012 3:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 26, 2009 3:51 pm
Posts: 214
Location: Westernmost tip of Norway
Nice one, thank you very much! :)


PS, you may want add "?dl=1" to the end of your dropbox link for us poor laze ones :wink: .

_________________
The best preparation for tomorrow is doing your best today.


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Fri Feb 17, 2012 9:36 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3320
Location: Netherlands
Nice work :)

I created a modified version that adds a control to set the number of quads per line.
To do so, the file is kept in memory and the data is (re)generated when requested.
It uses a different routine for the conversion to text that uses asm to make things a bit faster.
http://www.w73.nl/pb/Bin2Data_Mod.pb


Last edited by wilbert on Wed May 31, 2017 3:13 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Fri Feb 17, 2012 9:43 am 
Offline
User
User

Joined: Fri Apr 01, 2005 11:29 am
Posts: 76
Many thanks !


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Fri Feb 17, 2012 10:04 am 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5751
Location: Berlin - Germany
wilbert wrote:
Nice work :)

I created a modified version that adds a control to set the number of quads per line.
To do so, the file is kept in memory and the data is (re)generated when requested.
It uses a different routine for the conversion to text that uses asm to make things a bit faster.
http://www.waterlijn.info/pb/Bin2Data_Mod.pb

Thx, nice and very fast addition! :D
I have add your mod to the official release.

@all
The first download is changed to the enhanced version from wilbert.

_________________
PureBasic 5.70 | SpiderBasic 2.21 | Windows 10 Pro (x64) | Linux Mint 19.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Sat Feb 18, 2012 9:06 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3320
Location: Netherlands
I added an option to try to pack the data using the PB compression algorithm so the data can be decompressed without external libraries.
http://www.w73.nl/pb/Bin2Data_Mod.pb
If it succeeds, the result shows both the packed and original size.
It's mainly useful for text files.

Example of how it can be used :
Code:
If OpenWindow(0, 0, 0, 600, 300, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  EditorGadget(0, 10, 10, 580, 280)
 
  *Mem = AllocateMemory(1868)
  UnpackMemory(?Install_txt_start, *Mem)
  SetGadgetText(0, PeekS(*Mem, 1868, #PB_Ascii))
  FreeMemory(*Mem)
 
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

DataSection
  Install_txt_start:
    ; packed size : 1180 bytes
    ; original size : 1868 bytes
    Data.q $0000074C626C7A31,$2D57500A00100000,$5020200A0A000000,$6369736142657275,$4D2072002B6F6620
    Data.q $000A5820534F6361,$736E49202E4965E8,$74616C6C6100F874,$42865C40006E6F69,$76652065726F6665
    Data.q $6968747972000065,$20756F79202C676E,$742064028065656E,$006874203E69206F,$6C65766544206500
    Data.q $6F7420737265706F,$582820736C00006F,$7266202965646F43,$7070410000206D6F,$617661280A20656C
    Data.q $6500006C62616C69,$65206E61206E6F20,$0344432061727478,$7070696873202C00,$8468746977206465
    Data.q $187027726F20F080,$200000646440615E,$746973206265770A,$00632041202E2965,$6E61632079706F00
    Data.q $6E776F6420656220,$646564616F00006C,$7468206572656820,$3A2F2F3C303A7074,$6D6F6300002E4A2E
    Data.q $582F534C4F4F542F,$0A00002E65646F63,$6968742065636E4F,$006F642073692073,$202941013A656E12
    Data.q $201420676E697355,$4400E5498CC97469,$0179736165282045,$3120202F2940A400,$67617218A9442029
    Data.q $65726964C6000C28,$03772079726F7463,$2E746E6177469548,$293236000020200A,$2D656C62756F4420
    Data.q $F76B6320F0696C63,$6369FFC184273E27,$6C69778B00062C67,$68636E75616C206C,$7F2E454449690282
    Data.q $692480417FB17033,$08642072796F4A63,$7661680C6B636F10,$6D7265704E000065,$20796C746E656E61
    Data.q $6C61668020706F28,$02FD0042520A2E29,$006C616E696D7265,$206C6C6568732F00,$6569726570786528
    Data.q $752064656300386E,$D47F222973726573,$6F688E80546E690B,$293113163D00656D,$203C006E65704F20
    Data.q $6520646E61207261,$665372657418006E,$006E69776F6C6C6F,$62202420323A6738,$78650BE000687361
    Data.q $0055502074726F70,$4349534142455200,$2F7E3D454D4F485F,$8C62657275087C70,$243D485441280103
    Data.q $632F34A000243A05,$A072656C69706D6F,$6800115405327350,$696C203320657365,$202095352A80656E
    Data.q $049EA929612E5020,$696877202C392068,$61666D6F44606863,$72706F0222697270,$F888006588746169
    Data.q $20746C7561666564,$2820656E6F00110A,$2E03646C756F6873,$2E3046206E6F1BE6,$6102C033332E3031
    Data.q $2962A22965766F62,$662F74657318D020,$5981696699726176,$E1BC73202C07E850,$0A589816F02011F0
    Data.q $26BB4841776F6E6B,$6C20733010166F1C,$2029631380C76569,$37468A921F646461,$2503907AE1A5132F
    Data.q $4061656D05687461,$6168740A20736E01,$75636508007865F8,$6E756F662073A974,$50F198182D890A64
    Data.q $6560205B0665620F,$796E61AA418A0A20,$206669B69F1E84B3,$736B726F77B7C004,$6C450A64726F6320
    Data.q $307570ED094CDC79,$002E2F7EA0B2090A,$6C6966206372B700,$69666E6F63282065,$1C0008470CA12867
    Data.q $202E49490A0A0A29,$0A4F4B97BA707553,$7235004B66494731,$67005075622061D0,$657361656C70202C
    Data.q $A1CE746E139C514C,$677562011809EC1A,$006F209863657320,$6D75726F66D46673,$800AD56C2E7A9873
    Data.q $756F732061432053,$6E7320656304E572,$73656466A02C7459,$726540805E697263,$619904922E726F72
    Data.q $2F0100DA6D61796E,$2C74736567677573,$206C650121656620,$736F70BC65657266,$2073616D65212400
    Data.q $54B56C59816C6577,$614E80146B6E6168,$31E02120746F6C20,$6500006854000316,$736961746E614620
    Data.q $0074666F53206569,$6554206572617700
    Data.b $61,$6D,$2E,$0A
  Install_txt_end:
EndDataSection


Last edited by wilbert on Wed May 31, 2017 3:13 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Sat Feb 18, 2012 9:45 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 14, 2007 2:13 am
Posts: 979
Location: Darling River
This will be good for custom rtf style help files, I think. :?:

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
Reply with quote  
 Post subject: Re: Bin2Data - Crossplattform DataSection Maker, OpenSource
PostPosted: Sat Feb 18, 2012 10:50 am 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5751
Location: Berlin - Germany
wilbert wrote:
I added an option to try to pack the data using the PB compression algorithm

Thx, but i will not add this to official, the packroutines in pb not crossplattform-compatible in result :cry:

_________________
PureBasic 5.70 | SpiderBasic 2.21 | Windows 10 Pro (x64) | Linux Mint 19.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye