Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BASFILE - Converts small files to BAS code.
#11
Isn't * a valid filename character in Linux/Mac?  Wouldn't that make "*.*" a singular file search criteria just like "foo.bas" would be?
Reply
#12
(09-17-2023, 12:04 AM)grymmjack Wrote: OK I think there might be a bug in MacOS for this, for sure. Does passing "" work in Windows too @dav? Might want to do that way instead to make work everywhere if you like.

This works:
`IN$ = _OpenFileDialog$("Open File to encode...", "", "", "All files", -1)`

Note: passing `""` instead of `"*.*"`

@a740g FYI

Yeah. macOS does not like *.*. I'll check if we can handle that as a special case.

This should work too for all platforms:
`IN$ = _OpenFileDialog$("Open File to encode...", , , "All files", -1)`
Reply
#13
I have updated the BASFILE program once again - mainly to fix a conflict with the output code and this forum.  Now generated output can be safely posted on the forum without any errors (the posted code was breaking before because of the ' symbol in the encoded data).  

I've upgraded encoding method from Base64 to Base85 to make a smaller output code.  Although not the most efficient method out there, I decided to go with Base85 for this as it offers a good balance of space efficiency and decoding speed.   

Another change - BASFILE output now sets up the output code as a FUNCTION to call to decode the data and have it ready to go as a BASFILE$ string.  Having it set up this way makes it easier to incorporate encoded files to your programs, just insert the Function.

- Dav

EDIT:  Hmm.. looks like the forum QB tag still doesn't display encoded data correctly.  Not sure why, I'll have to ask @grymmjack for advice on that.  Still can post in the old CODE tag ok.  

Anyway, here's an example of what the new output looks like and can do.  Thanks to the new "memory" option in several QB64-PE functions now, loading a background image from code is easy.

Code: (Select All)
Screen _NewImage(1000, 650, 32)
Paper& = _LoadImage(BASFILE$, 32, "memory")
_PutImage (0, 0)-(_Width, _Height), Paper&


Function BASFILE$ ()
    'Returns decoded file as BASFILE$
    A$ = ""
    A$ = A$ + "3O.JPTD,^.<:rURPnd-DR*1\-EjLZcX/Iedwco;==\n0sP[mXXhRMvTg1NHRV5r{Y5U.1{,a"
    A$ = A$ + "}.ur^|bFNkq|^*mASvr)Y_Z9ks2+_ATwo]f2/H^Mv{*;odt-/i7dblw9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N+5\u"
    A$ = A$ + "8qb^yRAkMysk=JanN.o.a5N88t44?E/zrJH1A\+pp_JJ{J^1SFB3m[.1?Qug,ez0Cs'v2RK6"
    A$ = A$ + "q3v=Dy=|N'Oa.b-?L{nlso,1qgdyn<6whboi]_zj)f}rV[{74,Q+jYaG1cHd_gOjwJpH1aLp"
    A$ = A$ + "YX}b<]9cZj<z-*_-zn\?eW\SAjDL8(k]cE(WRAJtssBj^w7THBh\g8l4dR7gNz8-E0oh.j]{"
    A$ = A$ + "B3q9U.V8-/D6q(|S:B7rf<?RO4zZ4j*E1cKZTlN*ZUV)]_oNIx{yl16Kzn{Fj1odF2*Em]V9"
    A$ = A$ + "k<UAo-TkmTZ?=>B[9?Sg_;vbKk,,slpBVhM?bxvd_I-if:Y91M5wNVG:6j})Zs)udQsyw?-4"
    A$ = A$ + "Qcy[0?cikOuct4MI9Yb<f67fn=KbvNR[TDfI>*D=Z.zJO,dKEl{:qp';-yXN4[PTgl2P>>:{"
    A$ = A$ + ")8.c|0_uG>.}[nsGh|ltN;cNZG(vk0uQ{;{P|2/fsD:TOU,RksHf/c'z]r|pqtab74.inUFs"
    A$ = A$ + "V45>'_PP^B[*=[NUcrlphds8xPQYp1xXBWesJoPG8CCXBFNt<[4|Ai*oIFObNipeZT1^rnDG"
    A$ = A$ + "vDIiNsL)dp^p_M'UyjCTQk+8<V8>DipMHw0t<'n:f;hAf<9>q{QISo;]+wrfXR4{1{qFM19["
    A$ = A$ + "nNY]],Hp]>l4O[sc:uIs:*2TiCSn>ID<r^;w9zvkBPVlu43AcLC{dUbnBe14|o}YT-Woiqh^"
    A$ = A$ + "anWp};mAdOgNwidlx>F]K]zl97.U]jF\nFqD7Er<4\sWW1b,(Uv.1Cdy"
    For i = 39 To 125
        If i <> 64 And i <> 96 Then c$ = c$ + Chr$(i)
    Next: Dim v As _Unsigned Long
    a = Val(Mid$(A$, 1, 1))
    For i& = 2 To Len(A$) Step 5: v = 0
        For j& = 0 To 4: p& = 85 ^ (4 - j&)
            c& = InStr(c$, Mid$(A$, i& + j&, 1)) - 1
        v = v + c& * p&: Next: o$ = o$ + MKL$(v)
    Next: btemp$ = Mid$(o$, 1, Len(o$) - a + 1)
    BASFILE$ = _Inflate$(btemp$, 8874)
End Function

Find my programs here in Dav's QB64 Corner
Reply
#14
Hi Dav,
nice idea with that Base85 encoding, so you can safly store it in strings without getting the IDE into trouble with binary data.

Guess you're lucky with it for your needs, but have to tell that your methods are deathly inefficient for larger files like digital photos or MP3 music.

Have tested a ~250KB picture, needs ~12sec. for encoding and ~3sec. for decoding/writeback.
However, a ~500KB picture already needs ~80sec. for encoding and ~18sec. for decoding/writeback.

Then tested with an ~1.5MB MP3 file, no idea how long, I aborted encoding after 10min.

I had the same problem with my MakeDATA and MakeCARR programs. It's basically the way how QB64 handles things like
A$ = A$ + "Hello", it gets a new string and then 1st copies the current A$ and then the added string (Hello) into the new string and then makes that the new A$. So obviously this copying with each and every string addition/concatenation gives us an exponential raising copy loop.
It's ok as long as A$ won't grow to more than a couple 10000 chars, but gets really nasty if it grows into millions of chars, which have to be copied with every addition you do.

So you should be able to precalculate the length needed for your output string and pre-define it as
A$ = SPACE$(length) and then using MID$ with an counting offset to replace the spaces in A$ with the actual content. That way the given literal strings are directly copied into the existing A$, hence you don't have that ever copying of the growing A$ itself. This alone shoud give your code a speed boost for such big files from several minutes down to seconds.

A second thing I see is your use of MID$(x$,x,1), when reading just one char ASC(x$,x) is about 5x faster, even if you in turn maybe need to do ASC(x$,x) = ASC("char") if you can't modify your entire logic to operate on ASCII codes rather than single chars.
Reply
#15
Hi @RhoSigma!  Thanks for those tips!  Never thuoght of pre-SPACEing the needed string and MID$ing it in.  What a great idea.  I'll get working on that and see what happens.  THANKS!

EDIT: I just roughly re-wrote the Encoder using SPACE$/MID$ swapping like you suggested, already a HUGE speed increase!  On my laptop a 200k file took 5.55 secs encoding the old way - but only .05 sec with your way.  Wow!

EDIT2: Just re-did the decoder now, just as fast!  200k string decoded in the blink of an eye!  Now I'm going to data-test to make sure data is not getting messed up. 

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#16
Hey, @RhoSigma.  Try these - they are lightning fast now!  Thanks to you!   1MB done in the blink of an eye. A new BASFILE will be done tomorrow with speed changes.  Almost had it worked out tonight but have to quit for the evening.  In addition to decoder change I’m changing lines A$ = A$ + ... with MID$ too.

- Dav

Code: (Select All)

'==========
'BASE85.BAS - v0.30
'==========
'Base85 Encoder/Decoder Functions.
'Coded by Dav for QB64-PE 3.8.0, SEP/2023

'CREDIT:  Thanks to RhoSigma for helping me make these lightning fast!!


a1$ = Space$(1000000) ' make a 1MB string to test encoder/decoder speed

Print
Print "Original size:"; Len(a1$); "bytes."
Print

t1# = Timer
Print "Encoding"; Len(a1$); "bytes....";
a2$ = Base85Encode$(a1$)
Print Timer - t1#; "secs, output size:"; Len(a2$)
Print
t1# = Timer
Print "Decoding"; Len(a2$); "bytes....";
a3$ = Base85Decode$(a2$)
Print Timer - t1#; "secs, output:"; Len(a3$)
Print

If a1$ = a3$ Then
    Print "Original Data and Decoded Data Match!"
    Print Len(a1$), Len(a3$)
Else
    Print "Original Data and Decoded DO NOT Match!"
    Print Len(a1$), Len(a3$)
End If



Function Base85Encode$ (in$)
    For i = 39 To 125 'Make 85 character set to use
        If i <> 64 And i <> 96 Then c$ = c$ + Chr$(i)
    Next
    Dim v As _Unsigned Long

    t$ = in$ 'make a working copy so in$ isn't changed

    If Len(t$) Mod 4 > 0 Then 'pad needed bytes on end
        a = 5 - Len(t$) Mod 4
        t$ = t$ + Space$(a - 1)
    End If

    out$ = Space$(Len(t$) * 1.25): outb& = 1

    For i& = 1 To Len(t$) Step 4
        v = CVL(Mid$(t$, i&, 4))
        For j& = 4 To 0 Step -1
            p& = 85 ^ j&
            r& = v \ p&
            v = v Mod p&
            Mid$(out$, outb&, 1) = Mid$(c$, r& + 1, 1)
            outb& = outb& + 1
        Next
    Next
    Base85Encode$ = LTrim$(RTrim$(Str$(a))) + out$
End Function

Function Base85Decode$ (in$)
    For i = 39 To 125 'Make an 85 character set
        If i <> 64 And i <> 96 Then c$ = c$ + Chr$(i)
    Next
    Dim v As _Unsigned Long
    t$ = in$ 'use a working copy so in$ isn't changed
    a = Val(Mid$(t$, 1, 1)) 'grab pad number

    out$ = Space$(Len(t$) / 1.25 - 1): outb& = 1

    For i& = 2 To Len(in$) Step 5: v = 0
        For j& = 0 To 4: p& = 85 ^ (4 - j&)
            cv& = InStr(c$, Mid$(t$, i& + j&, 1)) - 1
            v = v + cv& * p&
        Next

        Mid$(out$, outb&, 4) = MKL$(v)
        outb& = outb& + 4

    Next
    Base85Decode$ = Mid$(out$, 1, Len(out$) - a + 1)
End Function

Find my programs here in Dav's QB64 Corner
Reply
#17
Good, 0.273 for encoding here and 0.277 for decoding on my 12yrs. old Win7 HP Laptop.

Then modified to load the entire "qb64pe.exe" ~9MB into the test string instead and it gave me 2.363 for encoding and 2.859 for decoding.

Now that are speeds we can live with in happiness Big Grin
Reply
#18
But the question then becomes: *Can the IDE handle such large amounts of data?*  Just as you mentioned a large string becoming slow to process as it grows, QB64's IDE is the same -- it's all stored in a single idet$ variable.  Once it gets so large, it spends more time moving back and forth in memory than it does processing your input.
Reply
#19
(09-28-2023, 10:03 AM)SMcNeill Wrote: But the question then becomes: *Can the IDE handle such large amounts of data?*  Just as you mentioned a large string becoming slow to process as it grows, QB64's IDE is the same -- it's all stored in a single idet$ variable.  Once it gets so large, it spends more time moving back and forth in memory than it does processing your input.

That's true, especially if the code isn't already properly formatted for the current IDE settings it could become a big problem when the IDE needs to add in spaces for indention and separation or needs to change the case from camel to all caps or vice versa.

That's the reason why after "MakeDATA" I did another tool "MakeCARR" which moved all the havy data out into a C/C++ header file while the .bm file which is actually incuded in the program and hence processed by the IDE just holds the write back function which does access the data on the C/C++ side.
Reply
#20
Yeah, large sources really bog down here for me.  I would only be using this for a few smaller files, but testing on large ones.   I better properly format the output, that's another good suggestion.

EDIT: Got the new BASFILE with the speed change working.  Output function decodes a 3.8MB file in .43 secs.  Using the MID$ calls instead of A$=A+  added a lot to the output size, so I had to increase the line length of the data to compensate and decrease.  The code is uglier but loads faster.  Perhaps 160 character length is too long.  I'm going to post a sample here to show what it outputs, and also to say hi to you guys...

- Dav

Code: (Select All)
Screen _NewImage(700, 600, 32)
hi& = _LoadImage(BASFILE$, 32, "memory")
_PutImage (0, 0)-(_Width, _Height), hi&

Function BASFILE$ ()
    'Returns decoded file as BASFILE$
    A$ = Space$(7346): a& = 1
    Mid$(A$, a&, 160) = "0stPC'{<7A='?'v6>VkBh'CL6q'H(<WzzC*T'.3jG*:*vM*:G.L*s9VT0(h]n+pI<j/H{g82\reP2\j2u71is*6Q2:R3Y\[8:bX7y>V}?BAN{fwC.?]g==ex<*UZ'I'\o'w,OTvU'<(uB'CC0H'CL9/''00*''''": a& = a& + 160
    Mid$(A$, a&, 160) = "''CC0((\(w5)ufjFhBf8W'(kVC'{>X0([vt5''LL4'P_|R(?>U01]Myr-0fh^1x]VYQTPxb2=.'0-}G4H2s68bQwaC].KcEi2wY_C4:FWr8KuCG9e[5a=Yef:>sKXKChU0|E*:{5HvESgJ8+FwN-4vQOFribS:|B": a& = a& + 160
    Mid$(A$, a&, 160) = ";TTc4LX-GQyYG-E2\vibX^8OTpbi3\7d*qeVgYlAnht;u<j5yhMmf^-zo(Dx3r;[+VsUAumvhwI,x+=sOyD{f_'>GQS''001t8_*RsKdOU9'2F*/0k/(d7{q1*G97+wV0wF7=qoCcQpm+]o7*L06co46tnv_hsjM": a& = a& + 160
    Mid$(A$, a&, 160) = "=x*QZHo>8[dciYC3i0O57Z;i8J?mq/=h^8NWhHlzo.wBD<Qa=6R=|O<EJ4Jwi3z52Ums-z4H{DG-:x/y1'=6dqdEpI=Lg\[ysKd|Vw)rN=/2|HH=eHcTGe4+<;ryY=:iCKNm:z^][,TfG^F(KBIws=^:K?4::g/x": a& = a& + 160
    Mid$(A$, a&, 160) = "'+XDg.[g1=rU7Q|lm5o[C3}huE08Gj}R=q+40-tHT3R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9.ui?2A=a9N?>taZ0W1/V1WT\HhshvF]loYGw1qWDXGixsVY^MM": a& = a& + 160
    Mid$(A$, a&, 160) = "SO8_iB3QlM_';rCxJS*CgG1hXFAi*?B]nb6^3NHAROpi[snkfGy8hx}in_<K9<^:nl.hs?oqa9x.Jr+(I2W'-3NkRx.u:Y;9*)5efL]yc),E9G=>Jh\>7q(yT3t4,)U2EB;;]WpGW)>Ka_p.U_K5ntGUawo>n>/U": a& = a& + 160
    Mid$(A$, a&, 160) = "]t=}8de|xb<0]LFcS0MG8MH;d0RUjOf)'T3+^ta0_w'ohWuPC5h,zOECLF(.-ujgcR;OVK>n8p\):HMboO,{A)Z[4me0eeVEr{\<6*[fTi*06Xe<9zSV-[h]^2DrgZzh'q(aBLP3_q:IS<N0yN=xSAJfhFBe1Plw": a& = a& + 160
    Mid$(A$, a&, 160) = "x'W'368EK^uf(,|1VtiYSmO_?.)efzU1ZUtnmdP</0Z/qclmha}Xy60oq/Ys)^/^=D{8mGj01VV(KPiaj/AxA4pB^{SSH3ox,9pymK3)\kClnr;l?2X/TML3c\;[ME0va<-P|))(3Tpxaf'4B(;z2Sc7C^-Hvqq4": a& = a& + 160
    Mid$(A$, a&, 160) = "M0w.h8ORG'x^1le<3/(X'B^M5oU^gw5Yl5VGt/HHkBll[^<v7C9;YT'pi/se9TPZcn[I(s-z_unsm]D.dhw5}Hy:L5P'C>>aP>q-rXw*oA-cR4TJ1up[LQO=WkeX(<bz-Si]-F;8s27V.>a>}2<>=W]w1Nr6XwxU": a& = a& + 160
    Mid$(A$, a&, 160) = "}Ty.(IPYMn0'R-qykwUx4mTaJSvU[6il{utU?Ift9;O>*y,.+F?wR]-3cQ9[(6j-?sVqqs8ii{n1SDAD[OG9kSbtt/KEk?zx'MBMpP17eT'd[h',Z{_s?D;puF>Z|2.u8IR_2V*XjXs{;>w(}Jd+dZDjUT2h<33,": a& = a& + 160
    Mid$(A$, a&, 160) = "V0'\6hr?kv-9v|v_'>O5cVLTve'/^RgV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O<LAKh]/>En.XAv;toy": a& = a& + 160
    Mid$(A$, a&, 160) = "Vzymw7wTrskTjc^D??3>PczscPHXq;zQ|qsc52^G,xnkDSurbd0NLQ]ABO:m(){LNyVeU-z\q:o7:O6pF;}.YA^FYII*Jc66/;]'22dXC\M0i0h\idTvL*T7{8IVhwL7;98;u-4_]41=)j|rPgaKsK*[GJ[w,Iyb": a& = a& + 160
    Mid$(A$, a&, 160) = ">(Sz5wtkBH9')O2?2Q6Sa0Mp|T,-j\nn;_^;yR0o\N<da?kz79jR<0ibm-Sg;440ReeNfMlzaun(9?1oK^TxLvBSe3;EvX/NNLN)Ls{;EDkvjcV+PJ6D'cx{bdt9M(^'Cm,P>O\74Hc1Trcvy=+3:2<7;c{{WBFz": a& = a& + 160
    Mid$(A$, a&, 160) = "K9mJ(\kNC+TC1OpcI/v;t'GRL;6NZsne3'xop/4,p9VtyEr3d(sL8=9MdK?t'UwZWyA=U:V^4},|:asCb];]MQ.u}/i9,(\<,E:?HXdT.Uc1+?'HL;j1(9(1\B_tLILE:AuWIvv2o,Q>M-bX0"
    o$ = Space$(5876): oc& = 1
    For i = 39 To 125
        If i <> 64 And i <> 96 Then c$ = c$ + Chr$(i)
    Next: Dim v As _Unsigned Long
    a = Val(Mid$(A$, 1, 1))
    For i& = 2 To Len(A$) Step 5: v = 0
        For j& = 0 To 4: p& = 85 ^ (4 - j&)
            c& = InStr(c$, Mid$(A$, i& + j&, 1)) - 1
        v = v + c& * p&: Next: Mid$(o$, oc&, 4) = MKL$(v)
        oc& = oc& + 4
    Next: btemp$ = Mid$(o$, 1, Len(o$) - a + 1)
    BASFILE$ = _Inflate$(btemp$, 5865)
End Function

Find my programs here in Dav's QB64 Corner
Reply




Users browsing this thread: 1 Guest(s)