![]() |
|
BASFILE - Converts small files to BAS code. - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: Dav (https://qb64phoenix.com/forum/forumdisplay.php?fid=34) +---- Thread: BASFILE - Converts small files to BAS code. (/showthread.php?tid=201) |
RE: BASFILE - Converts small files to BAS code. - Dav - 09-28-2023 I have updated the BASFILE program with the new MID$ decoding method for the warp speed increase. I also added an adjustable length& variable in the code so you can decide how long your data lines will be. The default value of 160 seems to match close to the output size of the older but slow A$=A$+ code. - Dav RE: BASFILE - Converts small files to BAS code. - mnrvovrfc - 09-28-2023 Code: (Select All)
A suggestion for people (like me) who have decided to "single-mindedly" use `OPTION _EXPLICIT`. (Just add declaration right below `Function` heading line.) RE: BASFILE - Converts small files to BAS code. - Dav - 09-29-2023 Hey, I'm kinda tickled my little area has some traffic. @mnrvovrfc: Good suggestion adding the DIM line. The goal is to output a portable FUNCTION people can add to any program easy, and that will help make it so. I admit I haven't used OPTION EXPLICIT before, and didn't really understand what it was for until I heard Fellippe talk about it in a podcast. I think it will help me prevent coding errors, so I'm going to get to know it. Also, I am very bad about naming variables well (I rush coding) so that is something I will try to work on. I think these Base91 functions are working without errors. I scrapped the ones I came up with because they kept corrupting data, so I went back to these I adapted from sources on the internet in another language. These seem to work ok. These haven't been speed up using the MID$ technique yet, will do that next. Will have to do something different than the Base85 function do. Since Base91 encoded output size is not 100% predictable like Base64 & Base85 output is (it can fluctuate according to input data), I will have to save the original input size in the B91 encoded data, and then strip it out during decoding. - Dav Code: (Select All)
RE: BASFILE - Converts small files to BAS code. - SpriggsySpriggs - 09-29-2023 I might have to make me another GUI frontend for your code, Dav! No promises, though. I rarely code for fun anymore. But I think it would be nice to not only make a GUI frontend but make it have a radio button for Base64, Base85, and Base91 for both BIN2BAS and PIC2MEM. RE: BASFILE - Converts small files to BAS code. - Dav - 10-02-2023 Another update to BASFILE. I made it a dialog only app, there's no main window. This hopefully makes it more user friendly. I also added the DIM line that was suggested to make it OPTION _EXPLICIT friendly. Also it now saves the encoded filename in the output function. Probably this will be the last update for a while unless there's an error that needs corrected. I have tested it in Windows & Linux. I would appreciate any feedback from a Mac user if it works OK or not. Thanks! @SpriggsySpriggs, sure go ahead. You may use them however you want. - Dav |