UEZ

FB File2Bas Code Generator v1.01 build 2020-05-25 beta.bas

UEZ
Apr 4th, 2019
653
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Coded by UEZ build 2020-05-25
  2. 'Thanks to marpon for simple_lzfx_v2, lzmat
  3. 'Windows only!
  4.  
  5. #Include Once "fbgfx.bi"
  6. #Include Once "file.bi"
  7. #include Once "string.bi"
  8. #Include Once "windows.bi"
  9. #Include Once "win\ShellApi.bi"
  10. #Include Once "win\Shlwapi.bi"
  11. #Include Once "win\commdlg.bi"
  12. #Include Once "zlib.bi"
  13. #Include Once "TitchySID v2.bi"
  14.  
  15. #Ifdef __Fb_64bit__
  16.     #Inclib "Gdiplus"
  17.     #Include Once "win\gdiplus-c.bi"
  18. #Else
  19.     #Include Once "win\gdiplus.bi"
  20.     Using Gdiplus
  21. #Endif
  22.  
  23. Using FB
  24.  
  25. Dim As OSVERSIONINFO OS
  26. OS.dwOSVersionInfoSize = Sizeof(OS)
  27. GetVersionEx(@OS)
  28.  
  29. If OS.dwBuildNumber < 7600 Then
  30.     MessageBox(0, "This operating system is not supported (Win7+ only)!", "ERROR", MB_OK Or MB_ICONSTOP Or MB_TOPMOST)
  31.     End
  32. Endif
  33.  
  34. #Define CRLF (Chr(13, 10))
  35. Const iLineCharLen = 504
  36.  
  37.  
  38. 'init GDIPlus
  39. Dim gdipToken As ULONG_PTR
  40. Dim GDIp As GdiplusStartupInput
  41. GDIp.GdiplusVersion = 1
  42. If GdiplusStartup(@gdipToken, @GDIp, NULL) <> 0 Then End
  43.  
  44. Type tFileArray
  45.     As Wstring * 4096 files(Any)
  46. End Type
  47.  
  48. Declare Sub About(fDAngle As Single = 180)
  49. Declare Function FileSaveDialog (Byref sTitle As String, Byref sDir As String = CurDir, sFilter As String = !"All Files (*.*)" + Chr(0) + "*.*" + Chr(0, 0)) As String
  50. Declare Sub BaseEncoder(aFiles As tFileArray, iLineLen As Ushort = iLineCharLen)
  51. Declare Function WndProc(hWnd As HWND,uMsg As UINT,wParam As WPARAM,lParam As LPARAM) As Integer
  52. Declare Function _WinAPI_IniRead(sIniFile As String, sSection As String, sKey As String, sDefault As String = "default") As String
  53. Declare Function _WinAPI_IniWrite(sIniFile As String, sSection As String, sKey As String, sValue As String = "default") As Integer
  54. Declare Function _WinAPI_CreateToolTip(hDlg As HWND, sToolTipText As String, bBalloon As Ubyte = 1, iWidth As Ushort = 500, toolID As Integer = 0) As HWND
  55. Declare Function _WinAPI_FlashWindowEx(hWND As HWND, iFlag As DWORD = FLASHW_ALL, iCount As ULong = 10, iTimeOut As DWORD = 500) As Integer
  56. Declare Function _WinAPI_RtlCompress(pBinary As Ubyte Ptr, iBinarySize As UInteger, Byref iCompressedSize As UInteger, bMaxCompression As Ubyte = 1, iCompressionEngine As Ushort = COMPRESSION_FORMAT_LZNT1) As Ubyte Ptr
  57. Declare Function _WinAPI_RtlDecompress(aBinary As Ubyte Ptr, iFileSize As UInteger, iCompressedSize As UInteger, iDecompressionEngine As Ushort = COMPRESSION_FORMAT_LZNT1) As Ubyte Ptr
  58. Declare Sub _WinAPI_InsertMenuItem(hMenuMain As HMENU, iItem As Uinteger, sText As String, iID As Uinteger = 0, hSubMenu As HMENU = 0, hBitmap As Any Ptr = 0, iBGColor As Integer = COLOR_HIGHLIGHTTEXT)
  59. Declare Function _GDIPlus_BitmapCreateFromMemory3(aBinImage As Ubyte Ptr, iLen As Ulong, bBitmap_GDI As Bool = False) As Any Ptr
  60. Declare Function _WinAPI_Base64Encode(binArray As Ubyte Ptr, iLen As Ulong, Byref iB64Len As Ulong, iFLags As Ulong = (CRYPT_STRING_BASE64 Or CRYPT_STRING_NOCRLF)) As String
  61. Declare Function Base91Decode(sString As String, Byref iBase91Len As Ulong) As Ubyte Ptr
  62. Declare Function Base91Encode(binArray As Ubyte Ptr, iLen as ulong, ByRef iLenOut as Ulong) As String
  63. Declare Function Base128Encode(binArray As Ubyte Ptr, iLen as ulong, ByRef iLenOut as Ulong) As String
  64. Declare Function DecompressImage(sLabel as string) As Any Ptr
  65. Declare Function DecompressHorseAnim() As Any Ptr
  66. Declare Sub DecompressSID()
  67.  
  68. Declare Function LZW_Encode Alias "fb_hEncode" (Byval in_buffer As Any Ptr, Byval in_size As Integer, Byval out_buffer As Any Ptr, Byref out_size As Integer) As Integer
  69. Declare Function LZW_Decode Alias "fb_hDecode" (Byval in_buffer  As Any Ptr, Byval in_size As Integer, Byval out_buffer As Any Ptr, Byref out_size As Integer) As Integer
  70.  
  71. 'Simple lzfx encoder - decoder without dependancies -> https://www.freebasic.net/forum/viewtopic.php?f=7&t=27188#p254954
  72. Declare Function lzfx_compress(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong , Byval obuf As Ubyte Ptr , Byref olen As Ulong) As Long
  73. Declare Function size_comp_buffer(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong ) As Long
  74.  
  75. /' Hashtable size (2**LZFX_HLOG entries) '/
  76. #Ifndef LZFX_HLOG
  77.     # define LZFX_HLOG          16
  78. #Endif
  79.  
  80. /' Predefined errors. '/
  81. #Define LZFX_ESIZE              -1      /' Output buffer too small '/
  82. #Define LZFX_ECORRUPT           -2      /' Invalid Data for decompression '/
  83. #Define LZFX_EARGS              -3      /' Arguments invalid (NULL) '/
  84.  
  85.  
  86. #Define LZFX_HSIZE              (1 Shl (LZFX_HLOG))
  87.  
  88. /' Define the hash Function '/
  89. #Define LZFX_FRST(p)            (((p[0]) Shl 8) Or p[1])
  90. #Define LZFX_NEXT(v,p)          (((v) Shl 8) Or p[2])
  91. #Define LZFX_IDX(h)             ((( h Shr (3 * 8 - LZFX_HLOG)) - h ) And (LZFX_HSIZE - 1))
  92.  
  93. /' These cannot be changed, as they are related to the compressed Format. '/
  94. #Define LZFX_MAX_LIT            (1 Shl 5)
  95. #Define LZFX_MAX_OFF            (1 Shl 13)
  96. #Define LZFX_MAX_REF            ((1 Shl 8) + (1 Shl 3))
  97.  
  98. /' This macro to reproduce   !a    in c'/
  99. #Define MY_NOT(value)           Iif(value = 0, 1, 0)
  100.  
  101.  
  102.  
  103. 'Simple lzmat encoder - decoder without dependancies -> https://www.freebasic.net/forum/viewtopic.php?f=7&t=27533
  104. #Ifndef _LZMAT_COMPRESS_BI_
  105.     #Define _LZMAT_COMPRESS_BI_  
  106.     #Define _COMPRESSION_LEVEL_ 2
  107.  
  108.     ' For tweaking the performances
  109.     #Define W_BITS_DEF          19                                   '' Window size (17..23)    21
  110.     #Define W_SIZE_DEF          (1 Shl W_BITS_DEF)
  111.     #Define W_MASK_DEF          (W_SIZE_DEF - 1)
  112.     #Define SLOT_BITS_DEF       4                                    ''                         4
  113.     #Define NUM_SLOTS_DEF       (1 Shl SLOT_BITS_DEF)
  114.  
  115.     #Define A_BITS_DEF          1                                    '' 1 xx                    2
  116.     #Define B_BITS_DEF          2                                    '' 01 xx                   2
  117.     #Define C_BITS_DEF          3                                    '' 001 xx                  2
  118.     #Define D_BITS_DEF          5                                    '' 0001 xxx                3
  119.     #Define E_BITS_DEF          7                                    '' 00001 xxxxx             5
  120.     #Define F_BITS_DEF          9                                    '' 00000 xxxxxxxxx         9
  121.     #Define A_DEF               (1 Shl A_BITS_DEF)
  122.     #Define B_DEF               ((1 Shl B_BITS_DEF) + A_DEF)
  123.     #Define C_DEF               ((1 Shl C_BITS_DEF) + B_DEF)
  124.     #Define D_DEF               ((1 Shl D_BITS_DEF) + C_DEF)
  125.     #Define E_DEF               ((1 Shl E_BITS_DEF) + D_DEF)
  126.     #Define F_DEF               ((1 Shl F_BITS_DEF) + E_DEF)
  127.     #Define MIN_MATCH_DEF       3                                    ''                         3
  128.     #Define MAX_MATCH_DEF       ((F_DEF - 1) + MIN_MATCH_DEF)
  129.  
  130.     #Define TOO_FAR_DEF         (1 Shl 16)
  131.  
  132.     #Define HASH1_LEN_DEF       MIN_MATCH_DEF
  133.     #Define HASH2_LEN_DEF       (MIN_MATCH_DEF + 1)
  134.     #Define HASH1_BITS_DEF      19                                   ''                         21
  135.     #Define HASH2_BITS_DEF      22                                   ''                         24
  136.     #Define HASH1_SIZE_DEF      (1 Shl HASH1_BITS_DEF)
  137.     #Define HASH2_SIZE_DEF      (1 Shl HASH2_BITS_DEF)
  138.     #Define HASH1_MASK_DEF      (HASH1_SIZE_DEF - 1)
  139.     #Define HASH2_MASK_DEF      (HASH2_SIZE_DEF - 1)
  140.     #Define HASH1_SHIFT_DEF     ((HASH1_BITS_DEF + (HASH1_LEN_DEF - 1)) / HASH1_LEN_DEF)
  141.     #Define HASH2_SHIFT_DEF     ((HASH2_BITS_DEF + (HASH2_LEN_DEF - 1)) / HASH2_LEN_DEF)
  142.  
  143.     #Macro FILL_OUT_MACRO(xbuf , d1 , d2)
  144.         xbuf[d1] = xbuf[d2]
  145.         d1 += 1
  146.         d2 += 1
  147.     #Endmacro
  148.    
  149.     #Define update_hash1(h, c)  Clng((((h) Shl HASH1_SHIFT_DEF) + (c)) And HASH1_MASK_DEF)
  150.     #Define update_hash2(h, c)  Clng((((h) Shl HASH2_SHIFT_DEF) + (c)) And HASH2_MASK_DEF)
  151.    
  152.     Type info_t
  153.         g_inbuf As Ubyte Ptr
  154.         g_outbuf As Ubyte Ptr
  155.         g_inbuf_pos As Long
  156.         g_outbuf_pos As Long
  157.         g_bit_buf As Long
  158.         g_bit_count As Long
  159.     End Type
  160.  
  161.     Declare Sub init_bits(Byval inbuf As Ubyte Ptr, Byval outbuf As Ubyte Ptr, Byval tinfo As info_t Ptr)
  162.     Declare Sub put_bits(Byval n As Long, Byval x As Long, Byval tinfo As info_t Ptr)
  163.     Declare Sub flush_bits(Byval tinfo As info_t Ptr)
  164.     Declare Function get_bits(Byval n As Long, Byval tinfo As info_t Ptr) As Long
  165.     Declare Function get_min(Byval a As Long, Byval b As Long) As Long
  166.     Declare Function get_max(Byval a As Long, Byval b As Long) As Long
  167.     Declare Function get_penalty(Byval a As Long, Byval b As Long) As Long
  168.     Declare Function lzmat_compress(Byval outbuf0 As Ubyte Ptr, Byval out_size As Long , Byval buf As Ubyte Ptr, Byval buf_size As Long, Byval level As Long) As Long
  169.     Declare Function lzmat_check(Byval inbuf As Ubyte Ptr)As Long
  170.     Declare Function lzmat_compressBound(Byval insize As Long)As Long
  171. #Endif  
  172.  
  173.  
  174. Const SC_DRAGMOVE = &hF012, iMaxFilesizeSum  = 100 * 1024^2 '100 MB
  175. Const fPI = Acos(-1), fRad = Acos(-1) / 180, fDeg = 180 / Acos(-1)
  176.  
  177. Dim As WNDCLASSEX wc
  178. Dim As MSG msg
  179. Dim Shared As HWND hGUI, hPic, hProgressbar
  180. Dim As Integer sW, sH
  181. ScreenInfo(sW, sH)
  182.  
  183. Dim szAppName As ZString * 6 => "FB GUI"
  184. Dim Shared As String sTitle
  185. sTitle = "FB File2Bas Code Generator v1.01 build 2020-05-25 beta"
  186.  
  187. Dim Shared As UShort iW, iH
  188. iW = 160
  189. iH = 120
  190.  
  191. Dim Shared As Short iDefaultPosX, iDefaultPosY
  192. iDefaultPosX = (sW - iW) \ 2
  193. iDefaultPosY = (sH - iH) \ 2
  194. Dim Shared As Ubyte iBaseEncoder = 2, iCompression, bOutputFile, bOutputClipboard, bMaxCompression, bProbeAllCompressors
  195. iCompression = 6: bOutputFile = 1: bOutputClipboard = 0: bMaxCompression = 1: bProbeAllCompressors = 0
  196. Dim As Short xPos = CShort(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "x", Str(iDefaultPosX)))
  197. Dim As Short yPos = Cshort(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "y", Str(iDefaultPosY)))
  198. iBaseEncoder = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Base", "Encoder", Str(iBaseEncoder)))
  199. iCompression = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "Engine", Str(iCompression)))
  200. bMaxCompression = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "MaxCompression", Str(bMaxCompression)))
  201. bProbeAllCompressors = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "ProbeAllCompressors", Str(bProbeAllCompressors)))
  202. bOutputFile = CUbyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Output", "File", Str(bOutputFile)))
  203. bOutputClipboard = CUbyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Output", "Clipboard", Str(bOutputClipboard)))
  204.  
  205. iBaseEncoder = Iif(iBaseEncoder < 0, 0, Iif(iBaseEncoder > 2, 2, iBaseEncoder))
  206. iCompression = Iif(iCompression < 0, 0, Iif(iCompression > 7, 7, iCompression))
  207.  
  208. Dim Shared As String aBaseEncoder(2)
  209. aBaseEncoder(0) = "Base64"
  210. aBaseEncoder(1) = "Base91"
  211. aBaseEncoder(2) = "Base128"
  212.  
  213. Dim Shared As tFileArray aFiles
  214. Dim Shared As RECT tPos
  215. Dim Shared As Ubyte bFilesAdded = 0
  216. Dim Shared As Ushort iFilesAdded = 0
  217.  
  218. With wc
  219.     .style          = CS_HREDRAW Or CS_VREDRAW
  220.     .lpfnWndProc    = @WndProc
  221.     .cbClsExtra     = NULL
  222.     .cbWndExtra     = NULL
  223.     .hInstance      = GetModuleHandle(NULL)
  224.     .hIcon          = LoadIcon(.hInstance, "FB_PROGRAM_ICON")
  225.     .hCursor        = LoadCursor(NULL, IDC_ARROW)
  226.     .hbrBackground  = GetStockObject(WHITE_BRUSH)
  227.     .lpszMenuName   = NULL
  228.     .lpszClassName  = @szAppName
  229.     .cbSize         = SizeOf(WNDCLASSEX)
  230. End With
  231.  
  232. RegisterClassEx(@wc)
  233.  
  234. hGUI = CreateWindowEx( WS_EX_TOPMOST Or WS_EX_ACCEPTFILES, _
  235.                        wc.lpszClassName, _
  236.                        sTitle, _
  237.                        WS_VISIBLE Or WS_POPUPWINDOW, _
  238.                        xPos, yPos, _
  239.                        iW, iH, _
  240.                        NULL, NULL, wc.hInstance, NULL)
  241.  
  242.  
  243. Dim As HWND hTooltip = _WinAPI_CreateToolTip(hGUI, "Drag'n'drop files here to convert to any base format (folders will be ignored!)!" & CRLF & "Rmb to display settings menu.")
  244.  
  245. hPic = CreateWindowEx(NULL, "Static", "", SS_BITMAP Or WS_CHILD Or WS_VISIBLE, 0, 0, iW, iH, hGUI, NULL, NULL, NULL)
  246. Dim As HBITMAP hLogo = DecompressImage("__fblogopng")
  247. SendMessage(hPic, STM_SETIMAGE, IMAGE_BITMAP, Cast(LPARAM, hLogo))
  248.  
  249. Dim As RECT rcClient
  250. GetClientRect(hGUI, @rcClient)
  251.  
  252. Dim As Integer cyVScroll = GetSystemMetrics(SM_CYVSCROLL)
  253.  
  254. hProgressbar = CreateWindowEx(  0, PROGRESS_CLASS, NULL, _
  255.                                 WS_CHILD or WS_VISIBLE Or PBS_SMOOTH, _
  256.                                 rcClient.left, rcClient.bottom - 10, _
  257.                                 rcClient.right, cyVScroll, _
  258.                                 hGUI, 0, wc.hInstance, NULL)
  259.  
  260. SendMessage(hProgressbar, PBM_SETSTEP, 1, 0)
  261. SendMessage(hProgressbar, PBM_SETBARCOLOR, 0, Cast(LPARAM, &hFFFFFF)) 'BGR
  262. SendMessage(hProgressbar, PBM_SETBKCOLOR, 0, Cast(LPARAM, &h0)) 'BGR
  263.  
  264. ShowWindow(hGUI, SW_NORMAL)
  265.  
  266.  
  267. Const WM_SHELLNOTIFY = WM_USER + 5, id_EncoderB91 = 5000, id_EncoderB128 = 5001, id_EncoderB64 = 5002, _
  268.       id_OutputFile = 5100, id_OutputClipboard = 5101, _
  269.       id_About = 5200, id_Exit = 5300, _
  270.       id_CompressionDisabled = 5400, id_CompressionLZNT1 = 5401, id_CompressionXPRESS = 5402, id_CompressionXPRESSHUFF = 5403, id_CompressionLZFX = 5405, id_CompressionZLib = 5406, id_CompressionLZMAT = 5407, id_CompressionLZWGfxlib = 5408, _
  271.       id_CompressionMaxCompression = 5450, id_ProbeAllCompressors = 5460, _
  272.       id_TrayReset = 5500, id_TrayExit = 5501, id_TrayAbout = 5502
  273. Dim Shared As HANDLE hMenuMain, hMenuSub1, hMenuSub2, hMenuSub3
  274.  
  275. Dim As HBITMAP hBmpCompress = DecompressImage("__compresspng"), hBmpOutput = DecompressImage("__outputpng"), hBmpAbout = DecompressImage("__aboutpng"), hBmpExit = DecompressImage("__exitpng"), _
  276.                hBmpBase = DecompressImage("__bubblebazina7_24x24png"), hBmpReset = DecompressImage("__resetpng"), hBmpFBIcn = DecompressImage("__fbicnpng")
  277.  
  278. 'create popup menu
  279. hMenuMain = CreatePopupMenu()
  280. hMenuSub1 = CreatePopupMenu()
  281. hMenuSub2 = CreatePopupMenu()
  282. hMenuSub3 = CreatePopupMenu()
  283.  
  284. _WinAPI_InsertMenuItem(hMenuMain, 0, "Base encoder", 0, hMenuSub1, hBmpBase)
  285. _WinAPI_InsertMenuItem(hMenuMain, 1, "Compression", 0, hMenuSub2, hBmpCompress)
  286. _WinAPI_InsertMenuItem(hMenuMain, 2, "Output to", 0, hMenuSub3, hBmpOutput)
  287. _WinAPI_InsertMenuItem(hMenuMain, 3, "")
  288. _WinAPI_InsertMenuItem(hMenuMain, 4, "About", id_About, , hBmpAbout)
  289. _WinAPI_InsertMenuItem(hMenuMain, 5, "")
  290. _WinAPI_InsertMenuItem(hMenuMain, 6, "Exit", id_Exit, , hBmpExit)
  291.  
  292. _WinAPI_InsertMenuItem(hMenuSub1, 0, aBaseEncoder(0), id_EncoderB64)
  293. _WinAPI_InsertMenuItem(hMenuSub1, 1, aBaseEncoder(1), id_EncoderB91)
  294. _WinAPI_InsertMenuItem(hMenuSub1, 2, aBaseEncoder(2), id_EncoderB128)
  295. CheckMenuRadioItem(hMenuSub1, 0, 2, iBaseEncoder, MF_BYPOSITION)
  296.  
  297. _WinAPI_InsertMenuItem(hMenuSub2, 0, "Disabled", id_CompressionDisabled)
  298. _WinAPI_InsertMenuItem(hMenuSub2, 1, "LZNT (Windows build-in) (default)", id_CompressionLZNT1)
  299. _WinAPI_InsertMenuItem(hMenuSub2, 2, "XPRESS (Windows build-in)", id_CompressionXPRESS) 'available on Win8+ os
  300. _WinAPI_InsertMenuItem(hMenuSub2, 3, "XPRESS HUFFmann (Windows build-in)", id_CompressionXPRESSHUFF) 'available on Win8+ os
  301. _WinAPI_InsertMenuItem(hMenuSub2, 4, "LZFX (experimental)", id_CompressionLZFX)
  302. _WinAPI_InsertMenuItem(hMenuSub2, 5, "ZLib", id_CompressionZLib)
  303. _WinAPI_InsertMenuItem(hMenuSub2, 6, "LZMAT (experimental)", id_CompressionLZMAT)
  304. _WinAPI_InsertMenuItem(hMenuSub2, 7, "LZW from GfxLib", id_CompressionLZWGfxlib)
  305. Dim Shared As Ubyte iMaxMenuSub2Items = 7
  306. _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 1, "")
  307. _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 2, "Use max compression", id_CompressionMaxCompression)
  308. _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 3, "")
  309. _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 4, "Probe all compressors (might be slow!)", id_ProbeAllCompressors)
  310.  
  311. _WinAPI_InsertMenuItem(hMenuSub3, 0, "File", id_OutputFile)
  312. _WinAPI_InsertMenuItem(hMenuSub3, 1, "Clipboard", id_OutputClipboard)
  313.  
  314. If OS.dwBuildNumber < 9200 Then
  315.     EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_DISABLED or MF_GRAYED)
  316.     EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_DISABLED or MF_GRAYED)
  317.     If iCompression = 2 Or iCompression = 3 Then iCompression = 1
  318. End If
  319.  
  320. 'Region Tray Menu
  321. Dim Shared As HMENU TrayMenu, MainMenu
  322. MainMenu = CreateMenu()
  323. TrayMenu = CreateMenu()
  324. Dim Shared As NOTIFYICONDATA SystrayIcon
  325.  
  326. 'Dim HICON As hIcon = ExtractIcon(GetModuleHandle(0), Command(0), 0)
  327. Dim As ICONINFO tIcon
  328. tIcon.fIcon = True
  329. tIcon.fIcon = True
  330. tIcon.hbmMask = hBmpFBIcn
  331. tIcon.hbmColor = hBmpFBIcn
  332. Dim HICON As hIcon = CreateIconIndirect(@tIcon)
  333.  
  334. With SystrayIcon
  335.     .cbSize = Len(SystrayIcon)
  336.     .hWnd = hGUI
  337.     .uId = 1&
  338.     .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
  339.     .uCallbackMessage = WM_SHELLNOTIFY
  340.     .hIcon = hIcon
  341.     .szTip = sTitle + Chr(0)
  342. End With
  343.  
  344. AppendMenu(TrayMenu, MF_STRING, id_TrayReset, "&Reset Windows Position")
  345. AppendMenu(TrayMenu, MF_SEPARATOR, 0, 0)
  346. AppendMenu(TrayMenu, MF_STRING, id_TrayAbout, "&About")
  347. AppendMenu(TrayMenu, MF_SEPARATOR, 0, 0)
  348. AppendMenu(TrayMenu, MF_STRING, id_TrayExit, "&Exit")
  349. InsertMenu(MainMenu, 0, MF_POPUP, Cptr(UINT_PTR, TrayMenu), 0)
  350.  
  351. SetMenuItemBitmaps(TrayMenu, id_TrayReset, MF_BYCOMMAND, hBmpReset, hBmpReset)
  352. SetMenuItemBitmaps(TrayMenu, id_TrayAbout, MF_BYCOMMAND, hBmpAbout, hBmpAbout)
  353. SetMenuItemBitmaps(TrayMenu, id_TrayExit, MF_BYCOMMAND, hBmpExit, hBmpExit)
  354.  
  355. Shell_NotifyIcon(NIM_ADD, @SystrayIcon)
  356.  
  357. Dim As MENUINFO tMenuBgColor
  358. With tMenuBgColor
  359.     .cbSize = Sizeof(MENUINFO)
  360.     .fMask = MIM_BACKGROUND
  361.     .hbrBack = GetSysColorBrush(COLOR_HIGHLIGHTTEXT)
  362. End With
  363. SetMenuInfo(TrayMenu, Cast(LPCMENUINFO, @tMenuBgColor))
  364.  
  365.  
  366. iCompression = Iif(iCompression < 0, 0, Iif(iCompression > iMaxMenuSub2Items, iMaxMenuSub2Items, iCompression))
  367. Select Case iCompression
  368.     Case 0  'no compression
  369.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  370.     Case 1 'COMPRESSION_FORMAT_LZNT1
  371.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  372.     Case 2 'COMPRESSION_FORMAT_XPRESS
  373.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  374.     Case 3 'COMPRESSION_FORMAT_XPRESS_HUFF
  375.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)   
  376.     Case 4 'internal LZFX compression format
  377.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  378.     Case 5 'ZLib compression format
  379.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  380.     Case 6 'internal LZMAT compression format
  381.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  382.     Case 7 'LZW-Codec within GfxLib
  383.         CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
  384. End Select
  385.  
  386. If bOutputFile Then CheckMenuItem(hMenuSub3, id_OutputFile, MF_CHECKED)
  387. If bOutputClipboard Then CheckMenuItem(hMenuSub3, id_OutputClipboard, MF_CHECKED)
  388. If bMaxCompression Then CheckMenuItem(hMenuSub2, id_CompressionMaxCompression, MF_CHECKED)
  389. If bProbeAllCompressors Then
  390.     CheckMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_CHECKED)
  391.     EnableMenuItem(hMenuSub2, id_CompressionDisabled, MF_DISABLED or MF_GRAYED)
  392.     EnableMenuItem(hMenuSub2, id_CompressionLZNT1, MF_DISABLED or MF_GRAYED)
  393.     EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_DISABLED or MF_GRAYED)
  394.     EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_DISABLED or MF_GRAYED)
  395.     EnableMenuItem(hMenuSub2, id_CompressionLZFX, MF_DISABLED or MF_GRAYED)
  396.     EnableMenuItem(hMenuSub2, id_CompressionZLib, MF_DISABLED or MF_GRAYED)
  397.     EnableMenuItem(hMenuSub2, id_CompressionLZMAT, MF_DISABLED or MF_GRAYED)
  398.     EnableMenuItem(hMenuSub2, id_CompressionLZWGfxlib, MF_DISABLED or MF_GRAYED)
  399. Endif
  400. If iCompression = 0 Then EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_DISABLED or MF_GRAYED)
  401.  
  402.  
  403. Dim Shared As HCURSOR hAnim
  404. hAnim = DecompressHorseAnim()
  405.  
  406. While GetMessage(@msg, 0, 0, 0)
  407.     TranslateMessage(@msg)
  408.     DispatchMessage(@msg)
  409.     'If InKey = Chr(27) Then Exit While
  410. Wend
  411.  
  412. Shell_NotifyIcon(NIM_DELETE, @SystrayIcon)
  413. DestroyIcon(hIcon)
  414. DestroyCursor(hAnim)
  415. DeleteObject(hLogo)
  416. DeleteObject(hBmpBase)
  417. DeleteObject(hBmpCompress)
  418. DeleteObject(hBmpOutput)
  419. DeleteObject(hBmpExit)
  420. DeleteObject(hBmpAbout)
  421. DeleteObject(hBmpReset)
  422. DeleteObject(hBmpFBIcn)
  423.  
  424. GdiplusShutdown(gdipToken)
  425.  
  426. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "x", Str(tPos.Left))
  427. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "y", Str(tPos.Top))
  428. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Base", "Encoder", Str(iBaseEncoder))
  429. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "Engine", Str(iCompression))
  430. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "MaxCompression", Str(bMaxCompression))
  431. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "ProbeAllCompressors", Str(bProbeAllCompressors))
  432. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Output", "File", Str(bOutputFile))
  433. _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Output", "Clipboard", Str(bOutputClipboard))
  434.  
  435. End
  436.  
  437. Private Sub About(fDAngle As Single = 180)
  438.     If Fileexists(Curdir & "\Unicornflakes.sid") <> -1 Then DecompressSID()
  439.    
  440.     Dim As __tagSIDInfo SID
  441.     Dim As __TitchySID TitchySID
  442.     TitchySID.Open(Curdir & "\Unicornflakes.sid", 0)
  443.    
  444.     Dim As UShort iW = 600, iH = 600, fCx = iW \ 2, fCy = iH \ 2
  445.     Dim As String sText = " " & sTitle & " coded by UEZ. Thanks to marpon for simple_lzfx_v2 & lzmat, StatMat for TitchySID.dll, Soren Lund for the SID and JL Gaillly / M. Adler for zlib. Press ESC or close window to exit ..............."
  446.     Dim As Ushort iLen = Len(sText)
  447.     Dim as Short i
  448.     Dim As String aText(0 To iLen - 1)
  449.     For i = 0 To iLen - 1
  450.         aText(i) = Mid(sText, iLen - i, 1)
  451.     Next
  452.     Type tagChars
  453.         As Single x, y
  454.         As Any Ptr img, gfx
  455.     End Type
  456.     Dim As tagChars tCoord(iLen - 1)
  457.     Dim As Single fSize = iLen / Sqr((iW * iW) + (iH * iH)) * 512, fSize2 = fSize * 2
  458.     Dim As Single fDegree, fAngle, mwx, mwy, fFontSize, f1, f2, c1 = fSize / 2, c2 = fSize2 / 2, fRadius = Sqr((iW * iW) / 10 + (iH * iH) / 10), _
  459.                   iDX = -fSize / 2, iDY = iDX, c3, c4 = iLen / 6, c5 = 0.85 * Sqr((iW * iW) / 2 + (iH * iH) / 2) / 2, _
  460.                   c6 = (iH / iW), c7 = (iW / iH)
  461.                  
  462.     ScreenControl SET_DRIVER_NAME, "GDI"
  463.     ScreenRes iW, iH, 32, 1, GFX_HIGH_PRIORITY Or GFX_NO_SWITCH Or GFX_ALWAYS_ON_TOP Or GFX_HIGH_PRIORITY Or &h80000000
  464.     WindowTitle "About"
  465.    
  466.     'center windows by adding the taskbar to the calculation
  467.     Dim as Integer iDW, iDH
  468.     ScreenControl GET_DESKTOP_SIZE, iDW, iDH
  469.     Dim tWorkingArea As RECT
  470.     SystemParametersInfo(SPI_GETWORKAREA, null, @tWorkingArea, null)
  471.     ScreenControl SET_WINDOW_POS, (iDW - iW) \ 2, ((tWorkingArea.Bottom - iH) - (iDH - tWorkingArea.Bottom)) \ 2
  472.  
  473.     Dim as HWND hHWND
  474.     ScreenControl(GET_WINDOW_HANDLE, Cast(Integer, hHWND))
  475.    
  476.     'init GDI / GDI+ canvas, pens, brushes, etc. for drawing
  477.     Dim As BITMAPINFO tBITMAP
  478.     With tBITMAP.bmiheader
  479.                 .biSize = Sizeof(BITMAPINFOHEADER)
  480.                 .biWidth = iW
  481.                 .biHeight = -iH
  482.                 .biPlanes = 1
  483.                 .biBitCount = 32
  484.                 .biCompression = BI_RGB
  485.     End With
  486.  
  487.     Dim As GpRectF tLayout, tLayout2
  488.     tLayout2.x = 0
  489.     tLayout2.y = 0
  490.     tLayout2.width = fSize
  491.     tLayout2.height = fSize / 2
  492.     Dim As Ulong Ptr aBitmap
  493.     Dim As Any Ptr hDC = GetDC(hHWND), _
  494.                         hHBitmap = CreateDIBSection(hDC, @tBITMAP, DIB_RGB_COLORS, @aBitmap, NULL, NULL), _
  495.                         hDC_backbuffer = CreateCompatibleDC(hDC), _
  496.                         hObjOld, hCanvas, hPen, hPen2, hBrush, hBrush2, hBrush_c, hMatrix, hMatrix2, hFont, hFamily, hFormat, hBitmap, hGfx, _
  497.                         hBitmap_Cursor, hGfx_Cursor, hBitmap_Bg, hGfx_Bg, hPath
  498.    
  499.     hObjOld = SelectObject(hDC_backbuffer, hHBitmap)
  500.     GdipCreateFromHDC(hDC_backbuffer, @hCanvas)
  501.     GdipSetSmoothingMode(hCanvas, 6) '6 = 8x8 aa
  502.     GdipSetPixelOffsetMode(hCanvas, PixelOffsetModeHalf)
  503.     'GdipSetInterpolationMode(hCanvas, InterpolationModeHighQualityBicubic)
  504.     GdipSetCompositingQuality(hCanvas, CompositingQualityGammaCorrected)
  505.     GdipGraphicsClear(hCanvas, &hFF606E8C)
  506.  
  507.     GdipCreatePen1(&h28101010, 1, 2, @hPen)
  508.     GdipSetPenStartCap(hPen, &h14)
  509.    
  510.     GdipCreatePen1(&h78101010, 8, 2, @hPen2)
  511.     GdipCreateLineBrushFromRectWithAngle(@tLayout2, &hD0202080, &hF06060FF, 45, 1, 0, @hBrush)
  512.     GdipSetLineSigmaBlend(hBrush, 0.5, 0.95)
  513.    
  514.    
  515.     GdipCreateBitmapFromScan0(iW, iH, 0, PixelFormat32bppARGB, 0, @hBitmap_Bg)
  516.     GdipGetImageGraphicsContext(hBitmap_Bg, @hGfx_Bg)
  517.     GdipSetSmoothingMode(hGfx_Bg, 6)
  518.     GdipSetPixelOffsetMode(hGfx_Bg, PixelOffsetModeHalf)
  519.    
  520.     Dim As GpPointF tPoint
  521.     tPoint.x = fCx
  522.     tPoint.y = fCy
  523.     Dim As Ulong iCnt = 1, iColor = &hFFB0B0B0
  524.     GdipCreatePath(0, @hPath)
  525.     GdipAddPathEllipse(hPath, 4, 4, iW - 9, iH - 9)
  526.     GdipCreatePathGradientFromPath(hPath, @hBrush2)
  527.     GdipSetPathGradientCenterColor(hBrush2, &hF0FFFFFF)
  528.     GdipSetPathGradientCenterPoint(hBrush2, @tPoint)
  529.     GdipSetPathGradientSurroundColorsWithCount(hBrush2, @iColor, @iCnt)
  530.     GdipSetPathGradientGammaCorrection(hBrush2, True)
  531.  
  532.     GdipFillEllipse(hGfx_Bg, hBrush2, 4, 4, iW - 9, iH - 9)
  533.     GdipDrawEllipse(hGfx_Bg, hPen2, 4, 4, iW - 9, iH - 9)  
  534.    
  535.    
  536.     GdipCreateSolidFill(&hFF200000, @hBrush_c)
  537.    
  538.     GdipCreateStringFormat(0, 0, @hFormat)
  539.     GdipCreateFontFamilyFromName("Consolas", 0, @hFamily)
  540.    
  541.     GdipCreateBitmapFromScan0(iW, iH, 0, PixelFormat32bppARGB, 0, @hBitmap)
  542.     GdipGetImageGraphicsContext(hBitmap, @hGfx)
  543.     GdipSetSmoothingMode(hGfx, 6)
  544.     GdipSetPixelOffsetMode(hGfx, PixelOffsetModeHalf)
  545.     GdipSetInterpolationMode(hGfx, InterpolationModeHighQualityBicubic)
  546.     GdipSetCompositingQuality(hGfx, CompositingQualityGammaCorrected)
  547.    
  548.     GdipCreateBitmapFromScan0(fSize2, fSize2, 0, PixelFormat32bppARGB, 0, @hBitmap_Cursor)    
  549.     GdipGetImageGraphicsContext(hBitmap_Cursor, @hGfx_Cursor)
  550.     GdipSetSmoothingMode(hGfx_Cursor, 6)
  551.     GdipSetPixelOffsetMode(hGfx_Cursor, PixelOffsetModeHalf)
  552.     GdipSetInterpolationMode(hGfx_Cursor, InterpolationModeHighQualityBicubic)
  553.     GdipSetCompositingQuality(hGfx_Cursor, CompositingQualityGammaCorrected)
  554.    
  555.     GdipCreateMatrix(@hMatrix)
  556.     GdipCreateMatrix(@hMatrix2)
  557.    
  558.     GdipSetStringFormatAlign(hFormat, StringAlignmentCenter)
  559.     GdipSetStringFormatLineAlign(hFormat, StringAlignmentCenter)
  560.    
  561.     For i = 0 To iLen - 1
  562.         GdipCreateBitmapFromScan0(fSize, fSize, 0, PixelFormat32bppARGB, 0, @tCoord(i).img)
  563.         GdipGetImageGraphicsContext(tCoord(i).img, @tCoord(i).gfx)
  564.         GdipSetSmoothingMode(tCoord(i).gfx, 6)
  565.         GdipSetPixelOffsetMode(tCoord(i).gfx, PixelOffsetModeHalf)
  566.         GdipSetTextRenderingHint(tCoord(i).gfx, TextRenderingHintAntiAliasGridFit)
  567.     Next
  568.    
  569.        
  570.     Dim As Bool bSkipSleep = False
  571.     For i = iLen - 1 To 0 Step - 1
  572.         GdipDrawImageRect(hCanvas, hBitmap_Bg, 0, 0, iW, iH)
  573.         GdipDrawImageRect(hCanvas, hBitmap, 0, 0, iW, iH)
  574.        
  575.         fDegree = fDAngle + iLen / c4 * i
  576.         tCoord(i).x = fCx + Sin(fDegree * fRad) * fRadius / c6
  577.         tCoord(i).y = fCy + Cos(fDegree * fRad) * fRadius / c7
  578.         fRadius -= c5 / iLen
  579.         fFontSize = fRadius / 7
  580.        
  581.         mwx = tCoord(i).x - fCx
  582.         mwy = fCy - tCoord(i).y
  583.         c3 = (mwx + Sqr(mwx * mwx + mwy * mwy))
  584.         fAngle = 2 * -ATn(mwy / c3) * fDeg
  585.         If c3 = 0 Then
  586.             If mwx < 0 Then
  587.                 fAngle = -180
  588.             Else
  589.                 fAngle = 180
  590.             End If
  591.         End If
  592.         f1 = iDX + c1
  593.         f2 = iDY + c1
  594.        
  595.         If i < (iLen - 1) Then
  596.             GdipSetPenWidth(hPen, fFontSize / 8)
  597.             GdipDrawLine(hCanvas, hPen, tCoord(i).x + f1, tCoord(i).y + f2, tCoord(i + 1).x + f1, tCoord(i + 1).y + f2)
  598.             GdipDrawLine(hGfx, hPen, tCoord(i).x + f1, tCoord(i).y + f2, tCoord(i + 1).x + f1, tCoord(i + 1).y + f2)
  599.         Endif
  600.        
  601.         GdipSetMatrixElements(hMatrix, 1, 0, 0, 1, 0, 0)
  602.         GdipTranslateMatrix(hMatrix, c1, c1, False)
  603.         GdipRotateMatrix(hMatrix, 90 + fAngle, False)
  604.         GdipTranslateMatrix(hMatrix, -c1, -c1, False)
  605.         GdipSetWorldTransform(tCoord(i).gfx, hMatrix)
  606.        
  607.         GdipSetMatrixElements(hMatrix2, 1, 0, 0, 1, 0, 0)
  608.         GdipTranslateMatrix(hMatrix2, c2, c2, False)
  609.         GdipRotateMatrix(hMatrix2, 90 + fAngle, False)
  610.         GdipTranslateMatrix(hMatrix2, -c2, -c2, False)
  611.         GdipSetWorldTransform(hGfx_Cursor, hMatrix2)   
  612.        
  613.        
  614.         GdipGraphicsClear(hGfx_Cursor, 0)
  615.         GdipFillRectangle(hGfx_Cursor, hBrush_c, fSize * 0.475, fSize * 0.1, fSize * 1.05, fSize * 1.55)
  616.        
  617.         fFontSize = Iif(fFontSize < 0.5, 0.5, fFontSize)
  618.         GdipCreateFont(hFamily, fFontSize, 0, 3, @hFont)
  619.        
  620.         tLayout.x = 0
  621.         tLayout.y = 0
  622.         tLayout.width = fSize
  623.         tLayout.height = fSize
  624.  
  625.         GdipDrawString(tCoord(i).gfx, aText(i), -1, hFont, @tLayout, hFormat, hBrush)
  626.         GdipDrawImageRect(hCanvas, tCoord(i).img, iDX + tCoord(i).x, iDY + tCoord(i).y, fSize, fSize)
  627.         GdipDrawImageRect(hGfx, tCoord(i).img, iDX + tCoord(i).x, iDY + tCoord(i).y, fSize, fSize)
  628.         GdipDrawImageRect(hCanvas, hBitmap_Cursor, tCoord(i).x + f1 - fFontSize, tCoord(i).y + f2 - fFontSize, fFontSize * 2, fFontSize * 2)
  629.        
  630.        
  631.         'GdipDrawLine(hCanvas, hPen2, 0, fCy, iW, fCy)
  632.         'GdipDrawLine(hCanvas, hPen2, fCx, 0, fCx, iH)
  633.        
  634.         BitBlt(hDC, 0, 0, iW, iH, hDC_backbuffer, 0, 0, SRCCOPY)
  635.        
  636.         GdipDeleteFont(hFont)
  637.         GdipGraphicsClear(hCanvas, &hFF606E8C)
  638.        
  639.         If bSkipSleep = False Then Sleep(175)
  640.         If InKey = Chr(32) Then bSkipSleep = True
  641.     Next
  642.    
  643.     GdipSetMatrixElements(hMatrix, 1, 0, 0, 1, 0, 0)
  644.     Dim e As Event
  645.     Do
  646.        
  647.         GdipTranslateMatrix(hMatrix, fCx, fCy, False)
  648.         GdipRotateMatrix(hMatrix, -0.2, False)
  649.         GdipTranslateMatrix(hMatrix, -fCx, -fCy, False)
  650.         GdipSetWorldTransform(hCanvas, hMatrix)
  651.         GdipDrawImageRect(hCanvas, hBitmap_Bg, 0, 0, iW, iH)
  652.         GdipDrawImageRect(hCanvas, hBitmap, 0, 0, iW, iH)
  653.         BitBlt(hDC, 0, 0, iW, iH, hDC_backbuffer, 0, 0, SRCCOPY)
  654.         GdipGraphicsClear(hCanvas, &hFF606E8C)
  655.        
  656.         Sleep(1, 1)
  657.         If (ScreenEvent(@e)) Then
  658.             Select Case e.type
  659.                 Case EVENT_WINDOW_CLOSE
  660.                     Exit Do
  661.             End Select
  662.         End If
  663.     Loop Until InKey = Chr(27) or InKey = Chr(255,107)
  664.    
  665.     GdipDeletePath(hPath)
  666.     GdipDeleteFontFamily(hFamily)
  667.     GdipDeleteStringFormat(hFormat)
  668.     GdipDeletePen(hPen)
  669.     GdipDeletePen(hPen2)
  670.     GdipDeleteBrush(hBrush)
  671.     GdipDeleteBrush(hBrush2)
  672.     GdipDeleteBrush(hBrush_c)
  673.     GdipDeleteMatrix(hMatrix)
  674.     GdipDeleteMatrix(hMatrix2)
  675.     For i = 0 To iLen - 1
  676.         GdipDeleteGraphics(tCoord(i).gfx)
  677.         GdipDisposeImage(tCoord(i).img)
  678.     Next
  679.     GdipDeleteGraphics(hGfx)
  680.     GdipDisposeImage(hBitmap)
  681.     GdipDeleteGraphics(hGfx_Cursor)
  682.     GdipDisposeImage(hBitmap_Cursor)
  683.     GdipDeleteGraphics(hGfx_Bg)
  684.     GdipDisposeImage(hBitmap_Bg)
  685.     SelectObject(hDC_backbuffer, hObjOld)
  686.     DeleteDC(hDC_backbuffer)
  687.     ReleaseDC(hHWND, hDC)
  688.    
  689.     TitchySID.Stop()
  690.     TitchySID.Close()
  691.     Screenres iW, iH, 32, , GFX_NULL 'send GUI to nirvana
  692.     'DestroyWindow(hHWND)  'doesn't work
  693.     'SendMessage(hHWND, WM_CLOSE, 0, 0)  'doesn't work
  694. End Sub
  695.  
  696. Sub BaseEncoder(aFiles As tFileArray, iLineLen As Ushort = iLineCharLen)
  697.     Dim As Uinteger iFileSize, iCompressedSize, iSizeBase
  698.     Dim As Integer hFile
  699.     Dim As Ulong i, j, iCompressionFormatAndEngine = 0, iChars, iLines, iCompression_tmp
  700.     Dim As Ubyte Ptr pMem, pMemCompressed
  701.     Dim As String sBaseEncoded, sCodeFile, sBaseCode = "'Code below was generated by: " & sTitle & CRLF & CRLF, sLine, sHeader, sInfo
  702.    
  703.     SendMessage(hProgressbar, PBM_SETRANGE, 0, MAKELPARAM(0, Ubound(aFiles.files) + 1))
  704.     SendMessage(hProgressbar, PBM_SETPOS, 0, 0)
  705.     For i = 0 To Ubound(aFiles.files)
  706.         SendMessage(hProgressbar, PBM_STEPIT, 0, 0)
  707.         iFileSize = Filelen(aFiles.files(i))
  708.         pMem = Allocate(iFileSize)
  709.         hFile = Freefile()
  710.         Open aFiles.files(i) For Binary Access Read As #hFile
  711.         Get #hFile, 0, pMem[0], iFileSize
  712.         Close #hFile
  713.  
  714.         iSizeBase = 0
  715.         iCompression_tmp = iCompression
  716.        
  717.         If iCompression Then
  718.             If bProbeAllCompressors Then
  719.                 Dim As Ubyte iBest = 0, j
  720.                 Static As Uinteger iProbeSize = &hFFFFFFFF
  721.                 Dim As Ubyte Ptr aMemCompressed(2 To 8)
  722.                 ? "1: Orignial file size: ", iFileSize
  723.                 sInfo &= "1: Orignial file size: " & Chr(09) & Format(iFileSize, "000000000") & CRLF
  724.                 For j = 2 To Ubound(aMemCompressed)
  725.                     Select Case j
  726.                         Case 2 To 4
  727.                             aMemCompressed(j) = _WinAPI_RtlCompress(pMem, iFileSize, iCompressedSize, bMaxCompression, j)
  728.                             ? j & ": WinAPI RTL (" & Iif(j = 2, "LZNT", Iif(j = 3, "XPRESS", "XPRESS H")) & "): ", iCompressedSize
  729.                             sInfo &= j & ": WinAPI RTL (" & Iif(j = 2, "LZNT", Iif(j = 3, "XPRESS", "XPRESS H")) & "): " & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
  730.                         Case 5
  731.                             Dim As Ulong iMem = iFileSize Shl 2
  732.                             aMemCompressed(j) = Allocate(iMem)
  733.                             iCompressedSize = iMem
  734.                             lzfx_compress(pMem, iFileSize, aMemCompressed(j), iCompressedSize) 
  735.                             ? j & ": LZFX: ",, iCompressedSize
  736.                             sInfo &= j & ": LZFX: " & Chr(09) & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
  737.                         Case 6
  738.                             iCompressedSize = compressBound(iFileSize)
  739.                             aMemCompressed(j) = Allocate(iCompressedSize)
  740.                             compress(aMemCompressed(j), @iCompressedSize, pMem, iFileSize)
  741.                             ? j & ": zlib: ",, iCompressedSize
  742.                             sInfo &= j & ": zlib: " & Chr(09) & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
  743.                         Case 7
  744.                             Dim As Ulong iMem = iFileSize Shl 2
  745.                             aMemCompressed(j) = Allocate(iMem)
  746.                             iCompressedSize = lzmat_compress(aMemCompressed(j), iMem, pMem, iFileSize, _COMPRESSION_LEVEL_ - Iif(bMaxCompression, 0, 2))
  747.                             ? j & ": LZMAT: ",, iCompressedSize
  748.                             sInfo &= j & ": LZMAT: " & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
  749.                         Case 8
  750.                             aMemCompressed(j) = Allocate(iFileSize)
  751.                             iCompressedSize = iFileSize
  752.                             LZW_Encode(pMem, iFileSize, aMemCompressed(j), iCompressedSize)            
  753.                             ? j & ": LZW: ",,, iCompressedSize
  754.                             sInfo &= j & ": LZW: " & Chr(09) & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF  
  755.                     End Select
  756.                     If iCompressedSize < iProbeSize And iCompressedSize < iFileSize Then
  757.                         iProbeSize = iCompressedSize
  758.                         iBest = j
  759.                         iCompressionFormatAndEngine = j
  760.                     End If 
  761.                 Next
  762.                
  763.                 ?
  764.                 ? "Best compression: " & iBest
  765.                 ? "------------------------------"
  766.                 sInfo &= CRLF & "Best compression: " & iBest & CRLF & "------------------------------" & CRLF & CRLF
  767.                
  768.                 For j = 2 To Ubound(aMemCompressed)
  769.                     If j <> iBest Then Deallocate(aMemCompressed(j))               
  770.                 Next
  771.                 iCompressedSize = Iif(iProbeSize = &hFFFFFFFF, 0, iProbeSize)
  772.                 pMemCompressed = aMemCompressed(iBest)
  773.                 iCompression = iBest - 1
  774.                 iCompression_tmp = iCompression
  775.                 iProbeSize = &hFFFFFFFF
  776.                 Select Case iCompression
  777.                     Case 1
  778.                         iCompressionFormatAndEngine = COMPRESSION_FORMAT_LZNT1
  779.                     Case 2
  780.                         iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS
  781.                     Case 3
  782.                         iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS_HUFF
  783.                     Case 4
  784.                         iCompressionFormatAndEngine = 5 'LZFX
  785.                     Case 5
  786.                         iCompressionFormatAndEngine = 6 'ZLib
  787.                     Case 6
  788.                         iCompressionFormatAndEngine = 7 'LZMAT
  789.                     Case 7
  790.                         iCompressionFormatAndEngine = 8 'LZW
  791.                 End Select
  792.             Else
  793.                 Select Case iCompression
  794.                     Case 1
  795.                         iCompressionFormatAndEngine = COMPRESSION_FORMAT_LZNT1
  796.                     Case 2
  797.                         iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS
  798.                     Case 3
  799.                         iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS_HUFF
  800.                 End Select
  801.            
  802.                 If iCompression < 4 Then 'use windows built-in api for compression
  803.                     pMemCompressed = _WinAPI_RtlCompress(pMem, iFileSize, iCompressedSize, bMaxCompression, iCompressionFormatAndEngine)           
  804.     '               hFile = Freefile()
  805.     '               Open "Test.bin" For Binary Access Write As #hFile
  806.     '               Put #hFile, 0, pMemCompressed[0], iCompressedSize
  807.     '               Close #hFile               
  808.                 Else
  809.                     Select Case iCompression
  810.                         Case 4 'LZFX
  811.                             Dim As Ulong iMem = iFileSize Shl 2
  812.                             pMemCompressed = Allocate(iMem)
  813.                             iCompressedSize = iMem
  814.                             lzfx_compress(pMem, iFileSize, pMemCompressed, iCompressedSize)
  815.                             iCompressionFormatAndEngine = 5
  816.                         Case 5 'ZLib
  817.                             iCompressedSize = compressBound(iFileSize)
  818.                             pMemCompressed = Allocate(iCompressedSize)
  819.                             compress(pMemCompressed, @iCompressedSize, pMem, iFileSize)
  820.                             iCompressionFormatAndEngine = 6
  821.                         Case 6 'LZMAT
  822.                             Dim As Ulong iMem = iFileSize Shl 2
  823.                             pMemCompressed = Allocate(iMem)
  824.                             iCompressedSize = lzmat_compress(pMemCompressed, iMem, pMem, iFileSize, _COMPRESSION_LEVEL_ - Iif(bMaxCompression, 0, 2))
  825.                             iCompressionFormatAndEngine = 7
  826.                         Case 7 'LZW
  827.                             'Screenres 1, 1, 1, GFX_NULL, GFX_NO_FRAME
  828.                             pMemCompressed = Allocate(iFileSize)
  829.                             iCompressedSize = iFileSize
  830.                             LZW_Encode(pMem, iFileSize, pMemCompressed, iCompressedSize)
  831.                             iCompressionFormatAndEngine = 8
  832.                     End Select
  833.                 Endif
  834.             End If
  835.             If iCompressedSize >= iFileSize Or iCompressedSize = 0 Then
  836.                 Select Case iBaseEncoder
  837.                     Case 0
  838.                         sBaseEncoded = _WinAPI_Base64Encode(pMem, iFileSize, iSizeBase)
  839.                     Case 1
  840.                         sBaseEncoded = Base91Encode(pMem, iFileSize, iSizeBase)
  841.                     Case 2
  842.                         sBaseEncoded = Base128Encode(pMem, iFileSize, iSizeBase)               
  843.                 End Select
  844.                 iCompression_tmp = 0
  845.                 iCompressedSize = 0
  846.                 ? "Compressed size larger than original file size. Compression skipped..."
  847.                 MessageBox(hGUI, "Compressed size larger than original file size. Compression skipped...", "Information", MB_ICONINFORMATION Or MB_OK)
  848.             Else
  849.                 Select Case iBaseEncoder
  850.                     Case 0
  851.                         sBaseEncoded = _WinAPI_Base64Encode(pMemCompressed, iCompressedSize, iSizeBase)
  852.                     Case 1
  853.                         sBaseEncoded = Base91Encode(pMemCompressed, iCompressedSize, iSizeBase)
  854.                     Case 2
  855.                         sBaseEncoded = Base128Encode(pMemCompressed, iCompressedSize, iSizeBase)               
  856.                 End Select             
  857.             End If
  858.             Deallocate(pMemCompressed)
  859.         Else
  860.             Select Case iBaseEncoder
  861.                 Case 0
  862.                     sBaseEncoded = _WinAPI_Base64Encode(pMem, iFileSize, iSizeBase)
  863.                 Case 1
  864.                     sBaseEncoded = Base91Encode(pMem, iFileSize, iSizeBase)
  865.                 Case 2
  866.                     sBaseEncoded = Base128Encode(pMem, iFileSize, iSizeBase)                               
  867.             End Select
  868.         End If
  869.         Deallocate(pMem)
  870.         '? "Base string length: " & Len(sBaseEncoded)
  871.        
  872.         sCodeFile = ""
  873.         iLines = 0
  874.         iChars = 0
  875.         sLine = ""
  876.         If iSizeBase > iLineLen Then
  877.             For j = 1 To iSizeBase
  878.                 sLine &= Mid(sBaseEncoded, j, 1)
  879.                 iChars += 1
  880.                 If iChars = iLineLen Then
  881.                     iChars = 0
  882.                     sCodeFile &= "Data """ & sLine & """" & CRLF
  883.                     iLines += 1
  884.                     sLine = ""
  885.                 End If         
  886.             Next
  887.             If sLine <> "" Then
  888.                 sCodeFile &= "Data """ & sLine & """" & CRLF
  889.                 iLines += 1
  890.             End If
  891.         Else
  892.             iLines = 1
  893.             sCodeFile &= "Data """ & sBaseEncoded & """" & CRLF
  894.         End If
  895.  
  896.         sHeader = "'" & Right(aFiles.files(i), Len(aFiles.files(i)) - Instrrev(aFiles.files(i), "\")) & CRLF & _
  897.                   "__Label" & i & ":" & CRLF & _
  898.                   "Data " & iLines & "," & Iif(iCompression <> iCompression_tmp, 0, iCompressionFormatAndEngine) & "," & iFileSize & "," & iCompressedSize & ",""" & aBaseEncoder(iBaseEncoder) & """" & CRLF
  899.         sBaseCode &= sHeader & sCodeFile & Iif(Ubound(aFiles.files) > i, CRLF & CRLF, "")
  900.     Next
  901.     If bProbeAllCompressors And Ubound(aFiles.files) < 6 Then MessageBox(hGUI, sInfo, "Information", MB_ICONINFORMATION Or MB_OK)
  902.    
  903.     SendMessage(hProgressbar, PBM_SETPOS, 0, 0)
  904.     _WinAPI_FlashWindowEx(hGUI)
  905.     If bOutputClipboard Then
  906.         Dim As Byte hClipboard = OpenClipboard(hGUI)
  907.         If hClipboard = 0 Then
  908.             MessageBox(hGUI, "Error opening the clipboard", "ERROR", MB_OK)
  909.         Else
  910.             If EmptyClipboard() = 0 Then
  911.                 CloseClipboard()
  912.                 MessageBox(hGUI, "Error cleaning the clipboard", "ERROR", MB_OK)
  913.             Else
  914.                 Dim As Any Ptr pMemClip, hMemClip = GlobalAlloc(GMEM_MOVEABLE Or GMEM_SHARE, Len(sBaseCode) + 1)
  915.                 pMemClip = GlobalLock(hMemClip)
  916.                 CopyMemory(pMemClip, Strptr(sBaseCode), Len(sBaseCode))
  917.                 GlobalUnlock(pMemClip)
  918.                 SetClipboardData(CF_TEXT, hMemClip)
  919.                 CloseClipboard()
  920.                 MessageBox(hGUI, "Generated code (" & Len(sBaseCode) & " bytes) has been copied to clipboard.", "Information", MB_ICONINFORMATION Or MB_OK)
  921.                 GlobalFree(hMemClip)
  922.             End If         
  923.         End If
  924.     End If
  925.     If bOutputFile Then
  926.         Dim As Ubyte bSaveFile = 1
  927.         Dim As String sFile = FileSaveDialog("Save generated FB code", "", "FreeBasic (*.bas)" + Chr(0) + "*.bas" + Chr(0))
  928.         If sFile <> "" Then
  929.             If Fileexists(sFile) Then
  930.                 If MessageBox(hGUI, "File exists - overwrite?", "Warning", MB_YESNO Or MB_ICONQUESTION) = 7 Then bSaveFile = 0
  931.             End If
  932.             If bSaveFile Then
  933.                 hFile = Freefile()
  934.                 If Right(sFile, 4) <> ".bas" Then sFile = sFile & ".bas"
  935.                 Open sFile For Binary Access Write As #hFile
  936.                 Put #hFile, 0, sBaseCode
  937.                 Close #hFile
  938.                 MessageBox(hGUI, "Generated code has been saved to disk.", "Information", MB_ICONINFORMATION Or MB_OK)
  939.             End If
  940.         End If
  941.     End If
  942.     _WinAPI_FlashWindowEx(hGUI, FLASHW_STOP)
  943. End Sub
  944.  
  945. Function WndProc(hWnd As HWND, uMsg As UINT, wParam As WPARAM, lParam As LPARAM) As Integer
  946.     Select Case uMsg
  947.         Case WM_SETCURSOR          
  948.                 SetCursor(Cast(HCURSOR, hAnim))
  949.                 Return 0
  950.         Case WM_NOTIFY
  951.        
  952.         Case WM_SHELLNOTIFY
  953.             If lParam = WM_RBUTTONDOWN Then
  954.                 Dim tPOINT As Point
  955.                 GetCursorPos(@tPOINT)
  956.                 SetForegroundWindow(hWnd)
  957.                 TrackPopupMenuEx(TrayMenu, TPM_LEFTALIGN Or TPM_RIGHTBUTTON, tPOINT.x, tPOINT.y, hWnd, NULL)
  958.                 PostMessage(hWnd, WM_NULL, 0, 0)
  959.             End If
  960.            
  961.         Case WM_DROPFILES
  962.             Dim As Ulong iCnt = DragQueryFileW(Cast(HDROP, wParam), -1, 0, 0)
  963.             If iCnt > 0 Then
  964.                 bFilesAdded = 0
  965.                 iFilesAdded = 0
  966.                 Dim As Ulong iSumFileSizes = 0
  967.                 Dim As Wstring * 4096 tFiles   
  968.                 Redim aFiles.files(0 To iCnt - 1)
  969.                 For i As Ulong = 0 To iCnt - 1
  970.                     DragQueryFileW(Cast(HDROP, wParam), i, Cast(LPWSTR, @tFiles), Sizeof(tFiles))
  971.                     If PathIsDirectoryW(tFiles) = 0 Then 'files only
  972.                         iSumFileSizes + = Filelen(tFiles)
  973.                         If iSumFileSizes > iMaxFilesizeSum Then
  974.                             MessageBox(hGUI, "Sum of file sizes has exceeded 100 MB - skipping the rest of the " & Ubound(aFiles.files) - i  & " files!", "Information", MB_ICONWARNING Or MB_OK)
  975.                             Exit For
  976.                         End If
  977.                         aFiles.files(iFilesAdded) = tFiles
  978.                         bFilesAdded = 1
  979.                         iFilesAdded += 1                   
  980.                     End If             
  981.                 Next
  982.                 If bFilesAdded Then
  983.                     iFilesAdded -= 1
  984.                     Redim Preserve aFiles.files(0 To iFilesAdded)          
  985.                     BaseEncoder(aFiles)
  986.                     Return 0
  987.                 Else
  988.                     MessageBox(hGUI, "No files were added!" & CRLF & "Directories are not supported!", "Information", MB_ICONWARNING Or MB_OK)
  989.                 End If         
  990.             End If
  991.             Return 0
  992.         Case WM_COMMAND
  993.             Select Case Loword (wParam)
  994.                 Case id_TrayReset
  995.                     SetWindowPos(hGUI, HWND_TOP, iDefaultPosX, iDefaultPosY, 0, 0, SWP_NOSIZE)
  996.                     Return 0
  997.                 Case id_Exit, id_TrayExit
  998.                     GetWindowRect(hGUI, @tPos)
  999.                     DestroyWindow(hGUI)
  1000.                     Return 0
  1001.                 Case id_EncoderB64, id_EncoderB91, id_EncoderB128
  1002.                     Select Case Loword (wParam)
  1003.                         Case id_EncoderB64
  1004.                             iBaseEncoder = 0
  1005.                             CheckMenuRadioItem(hMenuSub1, 0, 2, 0, MF_BYPOSITION)
  1006.                         Case id_EncoderB91
  1007.                             iBaseEncoder = 1
  1008.                             CheckMenuRadioItem(hMenuSub1, 0, 2, 1, MF_BYPOSITION)
  1009.                         Case id_EncoderB128
  1010.                             iBaseEncoder = 2
  1011.                             CheckMenuRadioItem(hMenuSub1, 0, 2, 2, MF_BYPOSITION)      
  1012.                     End Select
  1013.                     Return 0               
  1014.                 Case id_CompressionDisabled, id_CompressionLZNT1, id_CompressionXPRESS, id_CompressionXPRESSHUFF, id_CompressionLZFX, id_CompressionZlib, id_CompressionLZMAT, id_CompressionLZWGfxlib
  1015.                     Select Case Loword (wParam)
  1016.                         Case id_CompressionDisabled
  1017.                             iCompression = 0
  1018.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 0, MF_BYPOSITION)
  1019.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_DISABLED or MF_GRAYED)
  1020.                         Case id_CompressionLZNT1
  1021.                             iCompression = 1
  1022.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 1, MF_BYPOSITION)  
  1023.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
  1024.                         Case id_CompressionXPRESS
  1025.                             iCompression = 2
  1026.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 2, MF_BYPOSITION)      
  1027.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
  1028.                         Case id_CompressionXPRESSHUFF
  1029.                             iCompression = 3
  1030.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 3, MF_BYPOSITION)  
  1031.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
  1032.                         Case id_CompressionLZFX
  1033.                             iCompression = 4
  1034.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 4, MF_BYPOSITION)
  1035.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
  1036.                         Case id_CompressionZlib
  1037.                             iCompression = 5
  1038.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 5, MF_BYPOSITION)
  1039.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
  1040.                         Case id_CompressionLZMAT
  1041.                             iCompression = 6
  1042.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 6, MF_BYPOSITION)
  1043.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
  1044.                        Case id_CompressionLZWGfxlib
  1045.                             iCompression = 7
  1046.                             CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 7, MF_BYPOSITION)
  1047.                             EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)        
  1048.                     End Select
  1049.                     Return 0
  1050.                 Case id_CompressionMaxCompression
  1051.                     Dim As MENUITEMINFOA tMenu
  1052.                     tMenu.cbsize = Sizeof(tMenu)                   
  1053.                     tMenu.fMask = MIIM_STATE   
  1054.                     GetMenuItemInfoW(hMenuSub2, iMaxMenuSub2Items + 2, TRUE, Cast(LPMENUITEMINFOW, @tMenu))
  1055.                     If tMenu.fState = MF_CHECKED Then
  1056.                         CheckMenuItem(hMenuSub2, id_CompressionMaxCompression, MF_UNCHECKED)
  1057.                         bMaxCompression = 0
  1058.                     Else
  1059.                         CheckMenuItem(hMenuSub2, id_CompressionMaxCompression, MF_CHECKED)
  1060.                         bMaxCompression = 1
  1061.                     End If     
  1062.                     Return 0
  1063.                 Case id_ProbeAllCompressors
  1064.                     Dim As MENUITEMINFOA tMenu
  1065.                     tMenu.cbsize = Sizeof(tMenu)                   
  1066.                     tMenu.fMask = MIIM_STATE   
  1067.                     GetMenuItemInfoW(hMenuSub2, iMaxMenuSub2Items + 4, TRUE, Cast(LPMENUITEMINFOW, @tMenu))
  1068.                     If tMenu.fState = MF_CHECKED Then
  1069.                         CheckMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_UNCHECKED)
  1070.                         bProbeAllCompressors = 0
  1071.                         EnableMenuItem(hMenuSub2, id_CompressionDisabled, MF_ENABLED)
  1072.                         EnableMenuItem(hMenuSub2, id_CompressionLZNT1, MF_ENABLED)
  1073.                         EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_ENABLED)
  1074.                         EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_ENABLED)
  1075.                         EnableMenuItem(hMenuSub2, id_CompressionLZFX, MF_ENABLED)
  1076.                         EnableMenuItem(hMenuSub2, id_CompressionZLib, MF_ENABLED)
  1077.                         EnableMenuItem(hMenuSub2, id_CompressionLZMAT, MF_ENABLED)
  1078.                         EnableMenuItem(hMenuSub2, id_CompressionLZWGfxlib, MF_ENABLED)
  1079.                     Else
  1080.                         CheckMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_CHECKED)
  1081.                         bProbeAllCompressors = 1
  1082.                         EnableMenuItem(hMenuSub2, id_CompressionDisabled, MF_DISABLED or MF_GRAYED)
  1083.                         EnableMenuItem(hMenuSub2, id_CompressionLZNT1, MF_DISABLED or MF_GRAYED)
  1084.                         EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_DISABLED or MF_GRAYED)
  1085.                         EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_DISABLED or MF_GRAYED)
  1086.                         EnableMenuItem(hMenuSub2, id_CompressionLZFX, MF_DISABLED or MF_GRAYED)
  1087.                         EnableMenuItem(hMenuSub2, id_CompressionZLib, MF_DISABLED or MF_GRAYED)
  1088.                         EnableMenuItem(hMenuSub2, id_CompressionLZMAT, MF_DISABLED or MF_GRAYED)
  1089.                         EnableMenuItem(hMenuSub2, id_CompressionLZWGfxlib, MF_DISABLED or MF_GRAYED)
  1090.                     End If     
  1091.                     Return 0
  1092.                 Case id_OutputFile
  1093.                     Dim As MENUITEMINFOA tMenu
  1094.                     tMenu.cbsize = Sizeof(tMenu)                   
  1095.                     tMenu.fMask = MIIM_STATE   
  1096.                     GetMenuItemInfoW(hMenuSub3, 0, TRUE, Cast(LPMENUITEMINFOW, @tMenu))            
  1097.                     If tMenu.fState = MF_CHECKED And bOutputClipboard = 1  Then
  1098.                         CheckMenuItem(hMenuSub3, id_OutputFile, MF_UNCHECKED)
  1099.                         bOutputFile = 0
  1100.                     Else
  1101.                         CheckMenuItem(hMenuSub3, id_OutputFile, MF_CHECKED)
  1102.                         bOutputFile = 1
  1103.                     End If
  1104.                     Return 0
  1105.                 Case id_OutputClipboard
  1106.                     Dim As MENUITEMINFOA tMenu
  1107.                     tMenu.cbsize = Sizeof(tMenu)                   
  1108.                     tMenu.fMask = MIIM_STATE   
  1109.                     GetMenuItemInfoW(hMenuSub3, 1, TRUE, Cast(LPMENUITEMINFOW, @tMenu))            
  1110.                     If tMenu.fState = MF_CHECKED And bOutputFile = 1 Then
  1111.                         CheckMenuItem(hMenuSub3, id_OutputClipboard, MF_UNCHECKED)
  1112.                         bOutputClipboard = 0
  1113.                     Else
  1114.                         CheckMenuItem(hMenuSub3, id_OutputClipboard, MF_CHECKED)
  1115.                         bOutputClipboard = 1
  1116.                     End If
  1117.                     Return 0
  1118.                 Case id_About, id_TrayAbout
  1119.                     'MessageBox(hGUI, sTitle & CRLF & CRLF & "Coded by UEZ", "About", MB_OK)
  1120.                    About()
  1121.                     Return 0           
  1122.             End Select
  1123.         Case WM_CONTEXTMENU
  1124.             Dim tPOINT As Point
  1125.             GetCursorPos(@tPOINT)
  1126.             SetForegroundWindow(hWnd)
  1127.             TrackPopupMenuEx(hMenuMain, TPM_LEFTALIGN Or TPM_RIGHTBUTTON, tPOINT.x, tPOINT.y, hWnd, NULL)
  1128.             PostMessage(hWnd, WM_NULL, 0, 0)
  1129.             Return 0
  1130.         Case WM_KEYDOWN
  1131.             If wParam = VK_ESCAPE Then
  1132.                 GetWindowRect(hGUI, @tPos)
  1133.                 DestroyWindow(hGUI)
  1134.             Endif
  1135.             Return 0
  1136.         Case WM_CLOSE, WM_DESTROY
  1137.             PostQuitMessage(0) 
  1138.             Return 0
  1139.         Case WM_LBUTTONDOWN 'move GUI
  1140.             SendMessageW(hGUI, WM_SYSCOMMAND, SC_DRAGMOVE, 0)
  1141.             Return 0
  1142.         Case WM_DRAWITEM
  1143.        
  1144.     End Select
  1145.     Return DefWindowProc(hWnd, uMsg, wParam, lParam)
  1146. End Function
  1147.  
  1148. Sub _WinAPI_InsertMenuItem(hMenuMain As HMENU, iItem As Uinteger, sText As String, iID As Uinteger = 0, hSubMenu As HMENU = 0, hBitmap As Any Ptr = 0, iBGColor As Integer = COLOR_HIGHLIGHTTEXT)
  1149.     Dim As MENUITEMINFOA tMenuItem
  1150.     With tMenuItem
  1151.         .cbsize = Sizeof(tMenuItem)
  1152.         .wID = iID
  1153.         .hSubMenu = hSubMenu
  1154.         If sText = "" Then
  1155.             .fMask = MIIM_FTYPE
  1156.             .fType = MFT_SEPARATOR         
  1157.         Else
  1158.             .fMask = MIIM_ID Or MIIM_STRING Or MIIM_SUBMENU Or MIIM_BITMAP 'Or MIIM_STATE Or MIIM_TYPE
  1159.             .fType = MFT_OWNERDRAW Or MFT_STRING
  1160.             If hBitmap <> 0 Then .hbmpItem = hBitmap
  1161.         End If 
  1162.     End With
  1163.    
  1164.     Dim As Wstring * 260 tMenuText = sText
  1165.     tMenuItem.dwTypeData = Cast(LPTSTR, @tMenuText)
  1166.     InsertMenuItemW(hMenuMain, iItem, True, Cast(LPCMENUITEMINFOW, @tMenuItem))
  1167.  
  1168.     Dim As MENUINFO tMenuBgColor
  1169.     With tMenuBgColor
  1170.         .cbSize = Sizeof(MENUINFO)
  1171.         .fMask = MIM_BACKGROUND
  1172.         .hbrBack = GetSysColorBrush(iBGColor)
  1173.     End With
  1174.     SetMenuInfo(hMenuMain, Cast(LPCMENUINFO, @tMenuBgColor))
  1175. End Sub
  1176.  
  1177. 'https://msdn.microsoft.com/en-us/library/windows/desktop/hh298368(v=vs.85).aspx
  1178. Function _WinAPI_CreateToolTip(hDlg As HWND, sToolTipText As String, bBalloon As Ubyte = 1, iWidth As Ushort = 500, toolID As Integer = 0) As HWND
  1179.     If hDlg = 0 Or Len(sToolTipText) = 0 Then Return 0
  1180.     If Len(sToolTipText) > 79 Then Left(sToolTipText, 79)
  1181.     Dim hToolTip As HWND
  1182.    
  1183.     bBalloon = Iif(bBalloon > 1, 1, bBalloon)
  1184.     Dim As Long iStyle = bBalloon * TTS_BALLOON
  1185.     hToolTip = CreateWindowEx(Null, TOOLTIPS_CLASS, NULL, _
  1186.                               TTS_NOPREFIX Or TTS_ALWAYSTIP Or TTS_BALLOON Or iStyle, _
  1187.                               CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, _
  1188.                               hDlg, Null, Null, Null)
  1189.  
  1190.     If hToolTip = 0 Then Return 0
  1191.     SetWindowPos(hToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE)
  1192.     SendMessage(hToolTip, TTM_SETTIPBKCOLOR, &hFFFFFF, 0)
  1193.     SendMessage(hToolTip, TTM_SETTIPTEXTCOLOR, &h000000, 0)
  1194.     SendMessage(hToolTip, TTM_SETMAXTIPWIDTH, 0, iWidth) 'multi line tooltip text
  1195.    
  1196.     Dim As HWND hwndTool = GetDlgItem(hDlg, toolID)
  1197.     Dim tToolInfo As TOOLINFO
  1198.     With tToolInfo
  1199.         .cbSize = Sizeof(tToolInfo)
  1200.         .uFlags = TTF_SUBCLASS
  1201.         .hwnd = hDlg
  1202.         .hinst = Null
  1203.         .lpszText = Strptr(sToolTipText)
  1204.         .uId = Cptr(UINT_PTR, hwndTool)
  1205.     End With
  1206.     GetClientRect(hDlg, @tToolInfo.rect)
  1207.  
  1208.     SendMessage(hToolTip, TTM_ADDTOOL, 0, Cast(LPARAM, @tToolInfo))
  1209.  
  1210.     Return hToolTip
  1211. End Function
  1212.  
  1213. 'https://msdn.microsoft.com/en-us/library/ms724353.aspx
  1214. Function _WinAPI_IniRead(sIniFile As String, sSection As String, sKey As String, sDefault As String = "default") As String
  1215.     Dim As Zstring * 1024 Buffer
  1216.     Dim As Integer iResult = GetPrivateProfileString(sSection, sKey, sDefault, @Buffer, Sizeof(Buffer), sIniFile)
  1217.     Return Buffer
  1218. End Function
  1219.  
  1220. 'https://msdn.microsoft.com/en-us/library/ms725500(v=vs.85).aspx
  1221. Function _WinAPI_IniWrite(sIniFile As String, sSection As String, sKey As String, sValue As String = "default") As Integer
  1222.     Dim As Zstring * 1024 Buffer
  1223.     Dim As Integer iResult = WritePrivateProfileString(sSection, sKey, sValue, sIniFile)
  1224.     Return iResult
  1225. End Function
  1226.  
  1227. 'https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-flashwindowex
  1228. Function _WinAPI_FlashWindowEx(hWND As HWND, iFlag As DWORD = FLASHW_ALL, iCount As ULong = 10, iTimeOut As DWORD = 500) As Integer
  1229.     Dim As FLASHWINFO tFLASH
  1230.     tFlash.cbSize = Sizeof(FLASHWINFO)
  1231.     tFlash.hwnd = hGUI
  1232.     tFlash.dwFlags = iFlag
  1233.     tFlash.uCount = iCount
  1234.     tFlash.dwTimeout = iTimeOut
  1235.     Return FlashWindowEx(Cast(PFLASHWINFO, @tFLASH))   
  1236. End Function
  1237.  
  1238. 'https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-rtlcompressbuffer
  1239. Function _WinAPI_RtlCompress(pBinary As Ubyte Ptr, iBinarySize As UInteger, Byref iCompressedSize As UInteger, bMaxCompression As Ubyte = 1, iCompressionEngine As Ushort = COMPRESSION_FORMAT_LZNT1) As Ubyte Ptr
  1240.     Dim As Any Ptr hLib = Dylibload("Ntdll.dll")
  1241.    
  1242.     Dim pRtlGetCompressionWorkSpaceSize As Function _
  1243.                                             (Byval CompressionFormatAndEngine As Ushort, _
  1244.                                              Byval CompressBufferWorkSpaceSize As UInteger Ptr, _
  1245.                                              Byval CompressFragmentWorkSpaceSize As UInteger Ptr) As UInteger
  1246.    
  1247.  
  1248.     Dim pRtlCompressBuffer As Function _
  1249.                                             (Byval CompressionFormatAndEngine As Ushort, _
  1250.                                              Byval UncompressedBuffer As Ubyte Ptr, _
  1251.                                              Byval UncompressedBufferSize As UInteger, _
  1252.                                              Byval CompressedBuffer As Ubyte Ptr, _
  1253.                                              Byval CompressedBufferSize As UInteger, _
  1254.                                              Byval UncompressedBufferSize As UInteger, _
  1255.                                              Byval FinalCompressedSize As UInteger Ptr, _
  1256.                                              Byval WorkSpace As Ubyte Ptr) As UInteger
  1257.                                              
  1258.     pRtlGetCompressionWorkSpaceSize = Dylibsymbol(hLib, "RtlGetCompressionWorkSpaceSize")
  1259.     pRtlCompressBuffer = Dylibsymbol(hLib, "RtlCompressBuffer")
  1260.    
  1261.     Dim As UInteger iReturn, iCompressBufferWorkSpaceSize, iCompressFragmentWorkSpaceSize, iFinalCompressedSize = 0
  1262.     Dim As Ushort iCompressionFormatAndEngine = Iif(bMaxCompression, iCompressionEngine Or COMPRESSION_ENGINE_MAXIMUM, iCompressionEngine)
  1263.     iReturn = pRtlGetCompressionWorkSpaceSize(iCompressionFormatAndEngine, @iCompressBufferWorkSpaceSize, @iCompressFragmentWorkSpaceSize)
  1264.     Dim As Ubyte Ptr pWorkSpace = Allocate(iCompressBufferWorkSpaceSize), pBuffer = Allocate(2 * iBinarySize)
  1265.     iReturn = pRtlCompressBuffer(iCompressionFormatAndEngine, pBinary, iBinarySize, pBuffer, 2 * iBinarySize, 4096, @iFinalCompressedSize, pWorkSpace)
  1266.     iCompressedSize = iFinalCompressedSize
  1267.  
  1268.     Dim As Ubyte Ptr pCompressedBuffer
  1269.     If iFinalCompressedSize > 0 Then
  1270.         pCompressedBuffer = Allocate(iFinalCompressedSize)
  1271.         For i As UInteger = 0 To iFinalCompressedSize - 1
  1272.             pCompressedBuffer[i] = pBuffer[i]
  1273.         Next
  1274.     End If
  1275.     Deallocate(pWorkSpace)
  1276.     Deallocate(pBuffer)
  1277.     Dylibfree(hLib)
  1278.     Return pCompressedBuffer
  1279. End Function
  1280.  
  1281. 'https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-rtldecompressbufferex
  1282. Function _WinAPI_RtlDecompress(aBinary As Ubyte Ptr, iFileSize As UInteger, iCompressedSize As UInteger, iDecompressionEngine As Ushort = COMPRESSION_FORMAT_LZNT1) As Ubyte Ptr
  1283.  
  1284.    Dim As Any Ptr hLib = Dylibload("Ntdll.dll")
  1285.  
  1286.     Dim pRtlGetCompressionWorkSpaceSize As Function _
  1287.                                             (   Byval CompressionFormatAndEngine As Ushort, _
  1288.                                                 Byval CompressBufferWorkSpaceSize As UInteger Ptr, _
  1289.                                                 Byval CompressFragmentWorkSpaceSize As UInteger Ptr) As UInteger
  1290.                                              
  1291.    Dim pRtlDecompressBufferEx As Function _
  1292.                                            (   Byval CompressionFormat As Ushort, _
  1293.                                                Byval UncompressedBuffer As Ubyte Ptr, _
  1294.                                                Byval UncompressedBufferSize As UInteger, _
  1295.                                                Byval CompressedBuffer As Ubyte Ptr, _
  1296.                                                Byval CompressedBufferSize As UInteger, _
  1297.                                                Byval FinalUncompressedSize As UInteger Ptr, _
  1298.                                                 Byval WorkSpace As UInteger) As UInteger
  1299.    
  1300.     pRtlGetCompressionWorkSpaceSize = Dylibsymbol(hLib, "RtlGetCompressionWorkSpaceSize")  
  1301.     pRtlDecompressBufferEx = Dylibsymbol(hLib, "RtlDecompressBufferEx")
  1302.    
  1303.  
  1304.    Dim As UInteger iUSize, iDecompressBufferWorkSpaceSize, iDecompressFragmentWorkSpaceSize, iReturn
  1305.     iReturn = pRtlGetCompressionWorkSpaceSize(iDecompressionEngine, @iDecompressBufferWorkSpaceSize, @iDecompressFragmentWorkSpaceSize)
  1306.     Dim As Ubyte Ptr pWorkSpace = Allocate(iDecompressBufferWorkSpaceSize), pDecompress = Allocate(iFileSize)
  1307.     iReturn = pRtlDecompressBufferEx(iDecompressionEngine, pDecompress, iFileSize, aBinary, iCompressedSize, @iUSize, iDecompressBufferWorkSpaceSize)
  1308.     Deallocate(pWorkSpace)
  1309.    
  1310.     If iReturn Then
  1311.         ? "An Error has occured:"
  1312.         Select Case iReturn
  1313.             Case &hC0000242
  1314.                 ? Hex(iReturn) & ": STATUS_BAD_COMPRESSION_BUFFER"
  1315.             Case &hC00000E8
  1316.                 ? Hex(iReturn) & ": STATUS_INVALID_USER_BUFFER"
  1317.             Case &hC000025F
  1318.                 ? Hex(iReturn) & ": STATUS_UNSUPPORTED_COMPRESSION"
  1319.             Case &hC000000D
  1320.                 ? Hex(iReturn) & ": STATUS_INVALID_PARAMETER"
  1321.             Case &h00000117
  1322.                 ? Hex(iReturn) & ": STATUS_BUFFER_ALL_ZEROS"
  1323.             Case &hC00000BB
  1324.                 ? Hex(iReturn) & ": STATUS_NOT_SUPPORTED"
  1325.             Case &hC0000023
  1326.                 ? Hex(iReturn) & ": STATUS_BUFFER_TOO_SMALL"
  1327.         End Select
  1328.     End If
  1329.    Dylibfree(hLib)
  1330.    Return pDecompress
  1331. End Function
  1332.  
  1333.  
  1334. 'Original code by KristopherWindsor -> https://www.freebasic.net/forum/viewtopic.php?f=7&t=10981&hilit=FileOpenDialog
  1335. Function FileSaveDialog (Byref sTitle As String, Byref sDir As String = CurDir, sFilter As String = !"All Files (*.*)" + Chr(0) + "*.*" + Chr(0, 0)) As String
  1336.  Dim oFilename As OPENFILENAME
  1337.  Dim sFilename As Zstring * (MAX_PATH + 1)
  1338.  Dim Title As Zstring * 32 => sTitle
  1339.  Dim sInitialDir As Zstring * 256 => sDir
  1340.  
  1341.  With oFilename
  1342.    .lStructSize       = SizeOf(OPENFILENAME)
  1343.    .hwndOwner         = NULL
  1344.    .hInstance         = GetModuleHandle(NULL)
  1345.    .lpstrFilter       = Strptr(sFilter)
  1346.    .lpstrCustomFilter = NULL
  1347.    .nMaxCustFilter    = 0
  1348.    .nFilterIndex      = 1
  1349.    .lpstrFile         = @sFilename
  1350.    .nMaxFile          = SizeOf(sFilename)
  1351.    .lpstrFileTitle    = NULL
  1352.    .nMaxFileTitle     = 0
  1353.    .lpstrInitialDir   = @sInitialDir
  1354.    .lpstrTitle        = @Title
  1355.    .Flags             = OFN_EXPLORER Or OFN_FILEMUSTEXIST Or OFN_PATHMUSTEXIST
  1356.    .nFileOffset       = 0
  1357.    .nFileExtension    = 0
  1358.    .lpstrDefExt       = NULL
  1359.    .lCustData         = 0
  1360.    .lpfnHook          = NULL
  1361.    .lpTemplateName    = NULL
  1362.  End With
  1363.  
  1364.  If GetSaveFileName(@oFilename) = False Then Return ""
  1365.  Return sFilename
  1366. End Function
  1367.  
  1368. Function DecompressImage(sLabel as string) As Any Ptr
  1369.     'decompress base91 encoded image
  1370.     Dim As Ulong iLines, bCompressed, iFileSize, iCompressedSize
  1371.     Dim As String sBaseType, sBase91, aB91(1)
  1372.     select Case sLabel
  1373.         Case "__fblogopng"
  1374.             Restore __fblogopng:
  1375.         Case "__bubblebazina7_24x24png"
  1376.             Restore __bubblebazina7_24x24png:
  1377.         Case "__compresspng"
  1378.             Restore __compresspng:
  1379.         Case "__outputpng"
  1380.             Restore __outputpng:
  1381.         Case "__aboutpng"
  1382.             Restore __aboutpng:
  1383.         Case "__exitpng"
  1384.             Restore __exitpng:
  1385.         Case "__resetpng:"
  1386.             Restore __resetpng:
  1387.         Case "__fbicnpng"
  1388.             Restore __fbicnpng:
  1389.     End Select
  1390.     Read iLines
  1391.     Read bCompressed
  1392.     Read iFileSize
  1393.     Read iCompressedSize
  1394.     Read sBaseType
  1395.     For i As Ushort = 0 To iLines - 1
  1396.        Read aB91(0)
  1397.        sBase91 &= aB91(0)
  1398.     Next
  1399.  
  1400.     Dim As Ulong iLenB91
  1401.     Static As Ubyte Ptr aBinary
  1402.     aBinary = Base91Decode(sBase91, iLenB91)
  1403.  
  1404.     Dim As Any Ptr hBitmapGDI = _GDIPlus_BitmapCreateFromMemory3(aBinary, iLenB91, True)
  1405.     aBinary = 0
  1406.  
  1407.     Return hBitmapGDI      
  1408. end function
  1409.  
  1410. Function DecompressHorseAnim() As any Ptr
  1411.     Dim As Ulong iLines, bCompressed, iFileSize, iCompressedSize
  1412.     Dim As String sBaseType, sBase91, aB91(1)
  1413.     Restore __horseani:
  1414.     Read iLines
  1415.     Read bCompressed
  1416.     Read iFileSize
  1417.     Read iCompressedSize
  1418.     Read sBaseType
  1419.     For i As Ushort = 0 To iLines - 1
  1420.        Read aB91(0)
  1421.        sBase91 &= aB91(0)
  1422.     Next
  1423.  
  1424.     Dim As Ulong l
  1425.     Dim As Ubyte Ptr aBinary = Base91Decode(sBase91, l)
  1426.     Dim As Boolean bError = False
  1427.     If bCompressed Then
  1428.         If iCompressedSize <> l Then bError = TRUE
  1429.     Else
  1430.         If iFileSize <> l Then bError = TRUE
  1431.     Endif
  1432.     If bError <> False Then
  1433.         ? "Something went wrong"
  1434.         Sleep
  1435.         End
  1436.     End If
  1437.     Dim As HICON hAnim
  1438.    If bCompressed Then
  1439.        Dim as Ubyte Ptr aBinaryC = _WinAPI_RtlDecompress(aBinary, iFileSize, iCompressedSize)
  1440.         hAnim = CreateIconFromResourceEx(aBinaryC, iFileSize, True, &h30000, 0, 0, LR_DEFAULTCOLOR)
  1441.         Deallocate(aBinaryC)
  1442.     Else
  1443.         hAnim = CreateIconFromResourceEx(aBinary, iFileSize, True, &h30000, 0, 0, LR_DEFAULTCOLOR)
  1444.         aBinary = 0
  1445.    Endif
  1446.    Return hAnim
  1447. End Function
  1448.  
  1449. Sub DecompressSID()
  1450.     'decompress base91 encoded image
  1451.     Dim As Ulong iLines, bCompressed, iFileSize, iCompressedSize
  1452.     Dim As String sBaseType, sBase91, aB91(1)
  1453.  
  1454.     Restore __sid:
  1455.     Read iLines
  1456.     Read iCompression
  1457.     Read iFileSize
  1458.     Read iCompressedSize
  1459.     Read sBaseType
  1460.     For i As Ushort = 0 To iLines - 1
  1461.        Read aB91(0)
  1462.        sBase91 &= aB91(0)
  1463.     Next
  1464.  
  1465.     Dim As Ulong iLenB91
  1466.     Static As Ubyte Ptr aBinary
  1467.     aBinary = Base91Decode(sBase91, iLenB91)
  1468.  
  1469.     Dim As Integer hFile
  1470.     hFile = Freefile()
  1471.     Open "Unicornflakes.sid" For Binary Access Write As #hFile
  1472.  
  1473.     If iCompression Then
  1474.        Dim as Ubyte Ptr aBinaryC = _WinAPI_RtlDecompress(aBinary, iFileSize, iCompressedSize, iCompression)
  1475.        Put #hFile, 0, aBinaryC[0], iFileSize
  1476.        Deallocate(aBinaryC)
  1477.     Else
  1478.        Put #hFile, 0, aBinary[0], iFileSize
  1479.     Endif
  1480.     Close #hFile
  1481.     aBinary = 0
  1482. End Sub
  1483.  
  1484. Function _GDIPlus_BitmapCreateFromMemory3(aBinImage As Ubyte Ptr, iLen As Ulong, bBitmap_GDI As Bool = False) As Any Ptr
  1485.   Dim As HGLOBAL hGlobal
  1486.   Dim As LPSTREAM hStream
  1487.   Dim As Any Ptr hImage_Stream
  1488.   Dim As Any Ptr hMemory = GlobalAlloc(GMEM_MOVEABLE, iLen)
  1489.   Dim As Any Ptr lpMemory = GlobalLock(hMemory)
  1490.   RtlCopyMemory(lpMemory, @aBinImage[0], iLen)
  1491.   GlobalUnlock(hMemory)
  1492.   CreateStreamOnHGlobal(hMemory, 0, @hStream)
  1493.   GdipCreateBitmapFromStream(hStream, @hImage_Stream)
  1494.   IUnknown_Release(hStream)
  1495.  
  1496.   If bBitmap_GDI = TRUE Then
  1497.      Dim hImage_GDI As Any Ptr
  1498.      GdipCreateHBITMAPFromBitmap(hImage_Stream, @hImage_GDI, &hFF000000)
  1499.      GdipDisposeImage(hImage_Stream)
  1500.      Return hImage_GDI
  1501.   Endif
  1502.  
  1503.   Return hImage_Stream
  1504. End Function
  1505.  
  1506. Function Base91Encode(binArray As Ubyte Ptr, iLen as Ulong, ByRef iLenOut as Ulong) As String
  1507.     Dim sChars As String
  1508.     sChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~´" '´ instead of "
  1509.     Dim aB91(0 To 91) As String  '  This is 92 elements
  1510.  
  1511.     Dim As ULong i
  1512.     For i = 0 To UBound(aB91) - 1
  1513.         aB91(i) = Mid(sChars, i + 1, 1)   'split sChar to an array
  1514.     Next
  1515.  
  1516.     Dim As String sEncoded
  1517.     Dim As Long n
  1518.     Dim as ULong b, v
  1519.     b = 0
  1520.     n = 0
  1521.     For i = 0 To iLen - 1   'encode input to Base91
  1522.         b = b Or (binArray[i] Shl n)
  1523.         n += 8
  1524.         If n > 13 Then
  1525.             v = b And 8191
  1526.             If v > 88 Then
  1527.                 b = b Shr 13
  1528.                 n -= 13
  1529.             Else
  1530.                 v = b and 16383
  1531.                 b = b Shr 14
  1532.                 n -= 14
  1533.             EndIf  
  1534.         sEncoded &= aB91(v Mod 91) & aB91(v \ 91)
  1535.         EndIf
  1536.     Next
  1537.  
  1538.     If n Then
  1539.         sEncoded &= aB91(b Mod 91)      
  1540.         If (n > 7) Or (b > 90) Then sEncoded &= aB91(b \ 91)
  1541.     EndIf
  1542.     iLenOut = Len(sEncoded) 'return lentgh of the string
  1543.     Return sEncoded
  1544. End Function
  1545.  
  1546. Function Base91Decode(sString As String, Byref iBase91Len As Ulong) As Ubyte Ptr
  1547.     Dim As String sB91, sDecoded
  1548.     sB91 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~´" '´ instead of "
  1549.     Dim As Long i, n = 0, c, b = 0, v = -1
  1550.  
  1551.     Dim aChr(0 To Len(sString) - 1) As String
  1552.     For i = 0 To Ubound(aChr)            
  1553.         aChr(i) = Mid(sString, i + 1, 1)
  1554.     Next
  1555.    
  1556.     For i = 0 To Ubound(aChr)
  1557.         c = Instr(sB91, aChr(i)) - 1
  1558.         If v < 0 Then
  1559.             v = c
  1560.         Else
  1561.             v += c * 91
  1562.             b = b Or (v Shl n)
  1563.             n += 13 + (((v And 8191) <= 88) * -1)
  1564.             Do Until  (n > 7)=0
  1565.                 sDecoded &= Chr(b And 255)
  1566.                 b = b Shr 8
  1567.                 n -= 8
  1568.             Loop
  1569.             v = -1
  1570.         Endif
  1571.     Next
  1572.     If (v + 1) Then
  1573.         sDecoded &= Chr((b Or (v Shl n)) And 255)
  1574.     End If
  1575.    
  1576.     iBase91Len = Len(sDecoded)
  1577.        
  1578.     'workaround For multiple embedded file other crash will occure
  1579.     Static As Ubyte aReturn(0 To iBase91Len - 1)
  1580.     Redim aReturn(0 To iBase91Len - 1) As Ubyte
  1581.      
  1582.     For i = 0 To iBase91Len - 1 'convert result String To ascii code values
  1583.         aReturn(i) = Asc(sDecoded, i + 1)
  1584.     Next
  1585.     Return @aReturn(0) 'Return Pointer To the array
  1586. End Function
  1587.  
  1588. Function Base128Encode(binArray As Ubyte Ptr, iLen as ulong, ByRef iLenOut as Ulong) As String
  1589.     Dim As String sEncoded, sB128 = "!#$%()*,.0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎ"
  1590.  
  1591.     Dim aB128(0 To 127) As String
  1592.     Dim As Long i
  1593.     For i = 0 To Ubound(aB128)
  1594.         aB128(i) = Mid(sB128, i + 1, 1) 'split sChar to an array
  1595.     Next
  1596.  
  1597.     Dim aASCII(0 To iLen) As ULong
  1598.     For i = 0 To Ubound(aASCII) - 1
  1599.         aASCII(i) = binArray[i] 'split input to an ASCII array
  1600.     Next
  1601.     aASCII(Ubound(aASCII)) = Asc(" ")
  1602.  
  1603.     Dim As Long ls = 0, r = 0, rs = 7, nc
  1604.     For i = 0 To Ubound(aASCII)
  1605.         If ls > 7 Then
  1606.             i -= 1
  1607.             ls = 0
  1608.             rs = 7
  1609.         EndIf
  1610.         nc = ((aASCII(i) Shl ls) And &h7F) Or r
  1611.         r =   (aASCII(i) Shr rs) And &h7F
  1612.         rs -= 1
  1613.         ls += 1
  1614.         sEncoded &= aB128(nc)
  1615.     Next
  1616.  
  1617.     iLenOut = Len(sEncoded) 'return lentgh of the string
  1618.    
  1619.     Return sEncoded
  1620. End Function
  1621.  
  1622. 'https://docs.microsoft.com/en-us/windows/desktop/api/wincrypt/nf-wincrypt-cryptbinarytostringa
  1623. Function _WinAPI_Base64Encode(binArray As Ubyte Ptr, iLen As Ulong, Byref iB64Len As Ulong, iFLags As Ulong = (CRYPT_STRING_BASE64 Or CRYPT_STRING_NOCRLF)) As String
  1624.     Dim As Any Ptr hLib = Dylibload("Crypt32.dll")
  1625.     Dim pCryptBinaryToString As Function _
  1626.                               (Byval pbBinary As Ubyte Ptr, _
  1627.                                Byval cbBinary As Ulong, _
  1628.                                Byval dwFlags As Ulong, _
  1629.                                Byval pszString As Byte Ptr, _
  1630.                                Byval pcchString As Ulong Ptr) As Boolean
  1631.                                
  1632.     pCryptBinaryToString = Dylibsymbol(hLib, "CryptBinaryToStringA")
  1633.    
  1634.     Dim As Ulong iLenB64 = 0
  1635.     Dim As Boolean result = pCryptBinaryToString(binArray, _
  1636.                                                  iLen, _
  1637.                                                  iFLags, _
  1638.                                                  0, _
  1639.                                                  @iLenB64)
  1640.  
  1641.     iB64Len = iLenB64
  1642.     If iLenB64 = 0 Then Return ""
  1643.    
  1644.     Dim As Ubyte Ptr pB64 = Allocate(iLenB64)
  1645.     result = pCryptBinaryToString(binArray, _
  1646.                                                  iLen, _
  1647.                                                  iFLags, _
  1648.                                                  pB64, _
  1649.                                                  @iLenB64) 
  1650.    
  1651.     Dylibfree(hLib)
  1652.    
  1653.     Dim As String sEncoded
  1654.     For i As Ulong = 0 To iLenB64 - 1
  1655.         sEncoded &= Chr(pB64[i])
  1656.     Next
  1657.     Deallocate(pB64)
  1658.    
  1659.     Return sEncoded
  1660. End Function
  1661.  
  1662. 'by marpon
  1663. Private Function lzfx_compress(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong , Byval obuf As Ubyte Ptr , Byref olen As Ulong) As Long
  1664.     /' Hash table an array of Ubyte*'s which Point
  1665.      To various locations in the Input buffer '/
  1666.     Dim As Ubyte Ptr htab_arr(LZFX_HSIZE)
  1667.     Dim As Ubyte Ptr Ptr htab = @htab_arr(Lbound(htab_arr))
  1668.     Dim As Ubyte Ptr Ptr hslot      /' Pointer To entry in hash table '/
  1669.     Dim As Ulong hval      /' Hash value generated by macros above '/
  1670.     Dim As Ubyte Ptr ref          /' Pointer To candidate match location in Input '/
  1671.     Dim As Ubyte Ptr ip = ibuf
  1672.     Dim As Ubyte Ptr in_end = ip + ilen
  1673.     Dim As Ubyte Ptr op = obuf
  1674.     Dim As Ubyte Ptr out_end = op + olen         '(olen = NULL ? NULL : op + *olen)
  1675.     Dim As Long  lit    /' # of bytes in current literal Run '/
  1676.     Dim As Ulongint off1
  1677.  
  1678.     If (ibuf = NULL Or ilen = 0) Then
  1679.         olen = 0
  1680.         Return LZFX_EARGS
  1681.     End If
  1682.     If (obuf = NULL) Then
  1683.         olen = ilen * 1.1  + 80 / ilen    /'  consersative buffer Len '/
  1684.         Return 0
  1685.     End If
  1686.     /'  Start a literal Run.  Whenever we Do This the Output Pointer Is
  1687.      advanced because the current Byte will hold the encoded length. '/
  1688.     lit = 0 : op += 1
  1689.     hval = LZFX_FRST(ip)
  1690.     While(ip + 2 < in_end)   /' The Next macro reads 2 bytes ahead '/
  1691.         hval = LZFX_NEXT(hval , ip)
  1692.         hslot = htab + LZFX_IDX(hval)
  1693.         ref = *hslot : *hslot = ip
  1694.         If ref < ip Then off1 = ip - ref - 1
  1695.         If ((ref < ip)  Andalso (off1 < LZFX_MAX_OFF) Andalso ( ip + 4 < in_end)  _
  1696.             Andalso (ref > ibuf ) Andalso (ref[0] = ip[0]) Andalso (ref[1] = ip[1])  _
  1697.             Andalso (ref[2] = ip[2])) Then
  1698.             Dim As Ulong len1 = 3   /' We already know 3 bytes match '/
  1699.             Dim As Ulong maxlen = LZFX_MAX_REF
  1700.             If in_end - ip - 2 < LZFX_MAX_REF Then maxlen = in_end - ip - 2
  1701.             /' lit = 0:  op + 3 must be < out_end (because we undo the Run)
  1702.             lit <> 0:  op + 3 + 1 must be < out_end '/
  1703.             If op - MY_NOT(lit) + 4  >=  out_end Then Return LZFX_ESIZE
  1704.             op [- lit - 1] = lit - 1 /' Terminate literal Run '/
  1705.             op -= MY_NOT(lit)              /' Undo Run If length Is zero '/
  1706.             /'  Start checking at the fourth Byte '/
  1707.             While((len1 < maxlen) And (ref[len1] = ip[len1]))
  1708.                 len1 += 1
  1709.             Wend
  1710.             len1 -= 2  /' We encode the length As #octets - 2 '/
  1711.             /' Format 1: [LLLooooo oooooooo] '/
  1712.             If (len1 < 7) Then
  1713.                 *op = (off1 Shr 8) + (len1 Shl 5)
  1714.                 op += 1
  1715.                 *op = off1
  1716.                 op += 1
  1717.                 /' Format 2: [111ooooo LLLLLLLL oooooooo] '/
  1718.             Else
  1719.                 *op = (off1 Shr 8) + (7 Shl 5)
  1720.                 op += 1
  1721.                 *op = len1 - 7
  1722.                 op += 1
  1723.                 *op = off1
  1724.                 op += 1
  1725.             End If
  1726.             lit = 0 : op += 1
  1727.             ip += (len1 + 1)  /' ip = initial ip + #octets -1 '/
  1728.             If (ip + 3 >= in_end) Then
  1729.                 ip+=1   /' Code following expects Exit at bottom of Loop '/
  1730.                 Exit While                           'break
  1731.             End If
  1732.             hval = LZFX_FRST(ip)
  1733.             hval = LZFX_NEXT(hval , ip)
  1734.             htab[LZFX_IDX(hval)] = ip
  1735.             ip+=1   /' ip = initial ip + #octets '/
  1736.         Else
  1737.             /' Keep copying literal bytes '/
  1738.             If (op >= out_end) Then Return LZFX_ESIZE
  1739.             lit += 1 : *op = *ip : op += 1 : ip += 1
  1740.             If (lit = LZFX_MAX_LIT) Then
  1741.                 op [- lit - 1] = lit - 1 /' Stop Run '/
  1742.                 lit = 0 : op+=1 /' start Run '/
  1743.             End If
  1744.         End If /' If() found match in htab '/
  1745.     Wend  /' While(ip < ilen -2) '/
  1746.     /'  At most 3 bytes remain in Input.  We therefore need 4 bytes available
  1747.         in the Output buffer To store them (3 Data + ctrl Byte).'/
  1748.     If (op + 3 > out_end) Then Return LZFX_ESIZE
  1749.     While(ip < in_end)
  1750.         lit += 1 : * op = *ip : op += 1 : ip += 1
  1751.         If (lit = LZFX_MAX_LIT) Then
  1752.             op[- lit - 1] = lit - 1
  1753.             lit = 0 : op += 1
  1754.         End If
  1755.     Wend
  1756.     op[- lit - 1] = lit - 1
  1757.     op -= MY_NOT( lit)
  1758.     olen = op - obuf
  1759.     Return 0
  1760. End Function
  1761.  
  1762. Private Function size_comp_buffer(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong ) As Long
  1763.     If ibuf = NULL Or  ilen = 0 Then Return LZFX_EARGS
  1764.     Return  ilen * 1.1  + 80 / ilen    /'  consersative buffer Len '/    
  1765. End Function
  1766.  
  1767.  
  1768. Private Sub init_bits(Byval inbuf As Ubyte Ptr, Byval outbuf As Ubyte Ptr, Byval tinfo As info_t Ptr)
  1769.     tinfo->g_bit_count = 0
  1770.     tinfo->g_bit_buf = 0
  1771.     tinfo->g_inbuf_pos = 0
  1772.     tinfo->g_outbuf_pos = 0
  1773.     tinfo->g_inbuf = inbuf
  1774.     tinfo->g_outbuf = outbuf
  1775. End Sub
  1776.  
  1777. Private Sub put_bits(Byval n As Long, Byval x As Long, Byval tinfo As info_t Ptr)
  1778.     tinfo->g_bit_buf Or= x Shl tinfo->g_bit_count
  1779.     tinfo->g_bit_count += n
  1780.     While tinfo->g_bit_count >= 8
  1781.         tinfo->g_outbuf[tinfo->g_outbuf_pos] = tinfo->g_bit_buf
  1782.         tinfo->g_outbuf_pos += 1
  1783.         tinfo->g_bit_buf Shr= 8
  1784.         tinfo->g_bit_count -= 8
  1785.     Wend
  1786. End Sub
  1787.  
  1788. Private Sub flush_bits(Byval tinfo As info_t Ptr)
  1789.     put_bits(7, 0, tinfo)
  1790.     tinfo->g_bit_count = 0
  1791.     tinfo->g_bit_buf = 0
  1792. End Sub
  1793.  
  1794. Private Function get_bits(Byval n As Long, Byval tinfo As info_t Ptr) As Long
  1795.     While tinfo->g_bit_count < n
  1796.         tinfo->g_bit_buf Or= tinfo->g_inbuf[tinfo->g_inbuf_pos] Shl tinfo->g_bit_count
  1797.         tinfo->g_inbuf_pos += 1
  1798.         tinfo->g_bit_count += 8
  1799.     Wend
  1800.     Dim x As Long = tinfo->g_bit_buf And ((1 Shl n) - 1)
  1801.     tinfo->g_bit_buf Shr= n
  1802.     tinfo->g_bit_count -= n
  1803.     Return x
  1804. End Function
  1805.  
  1806. Private Function get_min(Byval a As Long, Byval b As Long) As Long
  1807.     Return Iif(a < b, a, b)
  1808. End Function
  1809.  
  1810. Private Function get_max(Byval a As Long, Byval b As Long) As Long
  1811.     Return Iif(a > b, a, b)
  1812. End Function
  1813.  
  1814. Private Function get_penalty(Byval a As Long, Byval b As Long) As Long
  1815.     Dim p As Long = 0
  1816.     While a > b
  1817.         a Shr= 3
  1818.         p += 1
  1819.     Wend
  1820.     Return p
  1821. End Function
  1822.  
  1823. Private Function lzmat_compress(Byval outbuf0 As Ubyte Ptr, Byval out_size As Long , Byval buf As Ubyte Ptr, Byval buf_size As Long, Byval level As Long) As Long
  1824.     If buf = NULL Or buf_size < 1 Then
  1825.         'fprintf(stderr, !"Source buffer corrupted: size=%d\n", buf_size)
  1826.         Return -1
  1827.     End If
  1828.     If outbuf0 = NULL Or out_size < 5 Then
  1829.         'fprintf(stderr, !"Compression buffer corrupted: size=%d\n", out_size)
  1830.         Return -2
  1831.     End If
  1832.     Dim outbuf As Ubyte Ptr = outbuf0 + 4
  1833.     Dim tinfo As info_t
  1834.     init_bits(NULL, outbuf, @tinfo)
  1835.  
  1836.     If level < 0 Or level > 2 Then level = 0
  1837.     Redim head(0 To (HASH1_SIZE_DEF + HASH2_SIZE_DEF ) - 1) As Long
  1838.     Redim prev(0 To W_SIZE_DEF - 1) As Long
  1839.     Dim max_chain(0 To ...) As  Long = {4, 256, 1 Shl 12}
  1840.     Dim h1 As Long = 0
  1841.     Dim h2 As Long = 0
  1842.     Dim i As Long = 0
  1843.     While i < (HASH1_SIZE_DEF + HASH2_SIZE_DEF)
  1844.         head(i) = -1
  1845.         i += 1
  1846.     Wend  
  1847.     i = 0
  1848.     While i < HASH1_LEN_DEF
  1849.         h1 = update_hash1(h1, buf[i])
  1850.         i += 1
  1851.     Wend
  1852.     i = 0
  1853.     While i < HASH2_LEN_DEF
  1854.         h2 = update_hash2(h2, buf[i])
  1855.         i += 1
  1856.     Wend
  1857.  
  1858.     Dim p As Long = 0
  1859.     While p < buf_size
  1860.         Dim len0 As Long = MIN_MATCH_DEF - 1
  1861.         Dim offset0 As Long = W_SIZE_DEF
  1862.         Dim max_match As  Long = get_min(MAX_MATCH_DEF, buf_size - p)
  1863.         Dim limit As  Long = get_max(p - W_SIZE_DEF, 0)
  1864.         If head(h1) >= limit Then
  1865.             Dim s As Long = head(h1)
  1866.             If buf[s] = buf[p] Then
  1867.                 Dim l As Long = 1
  1868.                 While l < max_match
  1869.                     If buf[(s + l)] <> buf[(p + l)] Then
  1870.                         Exit While
  1871.                     End If
  1872.                     l += 1
  1873.                 Wend
  1874.                 If l > len0 Then
  1875.                     len0 = l
  1876.                     offset0 = p - s
  1877.                 End If
  1878.             End If
  1879.         End If
  1880.         If len0 < MAX_MATCH_DEF Then
  1881.             Dim chain_len As Long = max_chain(level)
  1882.             Dim s As Long = head((h2 + HASH1_SIZE_DEF))
  1883.             While (chain_len <> 0) Andalso (s >= limit)
  1884.                 If (buf[(s + len0)] = buf[(p + len0)]) Andalso (buf[s] = buf[p]) Then
  1885.                     Dim l As Long = 1
  1886.                     While l < max_match
  1887.                         If buf[(s + l)] <> buf[(p + l)] Then
  1888.                             Exit While
  1889.                         End If
  1890.                         l += 1
  1891.                     Wend
  1892.                     Dim As Long itemp0 = get_penalty((p - s) Shr 4, offset0)
  1893.                     If l > (len0 + itemp0) Then
  1894.                         len0 = l
  1895.                         offset0 = p - s
  1896.                     End If
  1897.                     If l = max_match Then
  1898.                         Exit While
  1899.                     End If
  1900.                 End If
  1901.                 s = prev((s And W_MASK_DEF))
  1902.                 chain_len -= 1
  1903.             Wend
  1904.         End If
  1905.         If (len0 = MIN_MATCH_DEF) Andalso (offset0 > TOO_FAR_DEF) Then
  1906.             len0 = 0
  1907.         End If
  1908.         If ((level >= 2) Andalso (len0 >= MIN_MATCH_DEF)) Andalso (len0 < max_match) Then
  1909.             Dim next_p As  Long = p + 1
  1910.             Dim max_lazy As  Long = get_min(len0 + 4, max_match)
  1911.             Dim chain_len As Long = max_chain(level)
  1912.             Dim s As Long = head((update_hash2(h2, buf[(next_p + (HASH2_LEN_DEF - 1))]) + HASH1_SIZE_DEF))
  1913.             While (chain_len <> 0) Andalso (s >= limit)
  1914.                 If (buf[(s + len0)] = buf[(next_p + len0)]) Andalso (buf[s] = buf[next_p]) Then
  1915.                     Dim l As Long = 1
  1916.                     While l < max_lazy
  1917.                         If buf[(s + l)] <> buf[(next_p + l)] Then
  1918.                             Exit While
  1919.                         End If
  1920.                         l += 1
  1921.                     Wend
  1922.                     If l > (len0 + get_penalty(next_p - s, offset0)) Then
  1923.                         len0 = 0
  1924.                         Exit While
  1925.                     End If
  1926.                     If l = max_lazy Then
  1927.                         Exit While
  1928.                     End If
  1929.                 End If
  1930.                 s = prev((s And W_MASK_DEF))
  1931.                 chain_len -= 1
  1932.             Wend
  1933.         End If
  1934.         If len0 >= MIN_MATCH_DEF Then
  1935.             put_bits(1, 1, @tinfo)
  1936.             Dim l As  Long = len0 - MIN_MATCH_DEF
  1937.             If l < A_DEF Then
  1938.                 put_bits(1, 1, @tinfo)
  1939.                 put_bits(A_BITS_DEF, l, @tinfo)
  1940.             Elseif l < B_DEF Then
  1941.                 put_bits(2, 1 Shl 1, @tinfo)
  1942.                 put_bits(B_BITS_DEF, l - A_DEF, @tinfo)
  1943.             Elseif l < C_DEF Then
  1944.                 put_bits(3, 1 Shl 2, @tinfo)
  1945.                 put_bits(C_BITS_DEF, l - B_DEF, @tinfo)
  1946.             Elseif l < D_DEF Then
  1947.                 put_bits(4, 1 Shl 3, @tinfo)
  1948.                 put_bits(D_BITS_DEF, l - C_DEF, @tinfo)
  1949.             Elseif l < E_DEF Then
  1950.                 put_bits(5, 1 Shl 4, @tinfo)
  1951.                 put_bits(E_BITS_DEF, l - D_DEF, @tinfo)
  1952.             Else
  1953.                 put_bits(5, 0, @tinfo)
  1954.                 put_bits(F_BITS_DEF, l - E_DEF, @tinfo)
  1955.             End If
  1956.             offset0 -= 1
  1957.             Dim log0 As Long = W_BITS_DEF - NUM_SLOTS_DEF
  1958.             While offset0 >= (2 Shl log0)
  1959.                 log0 += 1
  1960.             Wend
  1961.             put_bits(SLOT_BITS_DEF, log0 - (W_BITS_DEF - NUM_SLOTS_DEF), @tinfo)
  1962.             If log0 > (W_BITS_DEF - NUM_SLOTS_DEF) Then
  1963.                 put_bits(log0, offset0 - (1 Shl log0), @tinfo)
  1964.             Else
  1965.                 put_bits(W_BITS_DEF - (NUM_SLOTS_DEF - 1), offset0, @tinfo)
  1966.             End If
  1967.         Else
  1968.             len0 = 1
  1969.             put_bits(9, buf[p] Shl 1, @tinfo)
  1970.         End If
  1971.         While len0 <> 0
  1972.             len0 -= 1
  1973.             head(h1) = p
  1974.             prev((p And W_MASK_DEF)) = head((h2 + HASH1_SIZE_DEF))
  1975.             head((h2 + HASH1_SIZE_DEF)) = p
  1976.             p += 1
  1977.             h1 = update_hash1(h1, buf[(p + (HASH1_LEN_DEF - 1))])
  1978.             h2 = update_hash2(h2, buf[(p + (HASH2_LEN_DEF - 1))])
  1979.         Wend
  1980.     Wend
  1981.     flush_bits(@tinfo)
  1982.     memcpy(outbuf0, @buf_size, 4)
  1983.     Return tinfo.g_outbuf_pos + 4
  1984. End Function
  1985.  
  1986. Private Function lzmat_check(Byval inbuf As Ubyte Ptr)As Long
  1987.     If inbuf = NULL Then
  1988.         'fprintf(stderr, !"Compressed buffer corrupted!\n")
  1989.         Return -1
  1990.     End If
  1991.     Return *Cptr(Ulong Ptr, inbuf)
  1992. End Function
  1993.  
  1994. Private Function lzmat_compressBound(Byval insize As Long)As Long
  1995.     If insize = 0 Then
  1996.         Return 0
  1997.     Elseif insize < 50 Then
  1998.         Return insize * 2 + 16
  1999.     Elseif insize < 100   Then
  2000.         Return insize * 1.4 + 8
  2001.     Elseif insize < 1000 Then  
  2002.         Return insize * 1.3
  2003.     Elseif insize < 10000 Then  
  2004.         Return insize * 1.25      
  2005.     End If
  2006.     Return insize * 1.2 + 32      
  2007. End Function
  2008.  
  2009.  
  2010.  
  2011. 'Generated by FB File2Bas Code Generator v0.80 build 2019-01-05 beta by UEZ
  2012.  
  2013. __horseani:
  2014. Data 7,1,18722,5607,"Base91"
  2015. Data "86Gtzzbj5xkAAAV/(3V*[51cw(IAAAi@h5ot&+|W3iAAcdKB%1f,QIL%´u7yQ´/B5wrN*hwWF:nN3$(&tE.o.I.2H?#Nf49/k^;msAFBQ´´+k^$kZBdEIoMSEtV%5EN$kATPKCvLDXDAYLDX$A25iGAA*zzIB=RT1T:|iLSKFHv(0W$AAAE´H7TK~FWA>´DtBAkAdJ1B*XhtiAS/yAXLzZxtBAGOgAC´=JE)[A;C1B:CUE[h^XqWDBCA~~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