Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Coded by UEZ build 2020-05-25
- 'Thanks to marpon for simple_lzfx_v2, lzmat
- 'Windows only!
- #Include Once "fbgfx.bi"
- #Include Once "file.bi"
- #include Once "string.bi"
- #Include Once "windows.bi"
- #Include Once "win\ShellApi.bi"
- #Include Once "win\Shlwapi.bi"
- #Include Once "win\commdlg.bi"
- #Include Once "zlib.bi"
- #Include Once "TitchySID v2.bi"
- #Ifdef __Fb_64bit__
- #Inclib "Gdiplus"
- #Include Once "win\gdiplus-c.bi"
- #Else
- #Include Once "win\gdiplus.bi"
- Using Gdiplus
- #Endif
- Using FB
- Dim As OSVERSIONINFO OS
- OS.dwOSVersionInfoSize = Sizeof(OS)
- GetVersionEx(@OS)
- If OS.dwBuildNumber < 7600 Then
- MessageBox(0, "This operating system is not supported (Win7+ only)!", "ERROR", MB_OK Or MB_ICONSTOP Or MB_TOPMOST)
- End
- Endif
- #Define CRLF (Chr(13, 10))
- Const iLineCharLen = 504
- 'init GDIPlus
- Dim gdipToken As ULONG_PTR
- Dim GDIp As GdiplusStartupInput
- GDIp.GdiplusVersion = 1
- If GdiplusStartup(@gdipToken, @GDIp, NULL) <> 0 Then End
- Type tFileArray
- As Wstring * 4096 files(Any)
- End Type
- Declare Sub About(fDAngle As Single = 180)
- Declare Function FileSaveDialog (Byref sTitle As String, Byref sDir As String = CurDir, sFilter As String = !"All Files (*.*)" + Chr(0) + "*.*" + Chr(0, 0)) As String
- Declare Sub BaseEncoder(aFiles As tFileArray, iLineLen As Ushort = iLineCharLen)
- Declare Function WndProc(hWnd As HWND,uMsg As UINT,wParam As WPARAM,lParam As LPARAM) As Integer
- Declare Function _WinAPI_IniRead(sIniFile As String, sSection As String, sKey As String, sDefault As String = "default") As String
- Declare Function _WinAPI_IniWrite(sIniFile As String, sSection As String, sKey As String, sValue As String = "default") As Integer
- Declare Function _WinAPI_CreateToolTip(hDlg As HWND, sToolTipText As String, bBalloon As Ubyte = 1, iWidth As Ushort = 500, toolID As Integer = 0) As HWND
- Declare Function _WinAPI_FlashWindowEx(hWND As HWND, iFlag As DWORD = FLASHW_ALL, iCount As ULong = 10, iTimeOut As DWORD = 500) As Integer
- 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
- Declare Function _WinAPI_RtlDecompress(aBinary As Ubyte Ptr, iFileSize As UInteger, iCompressedSize As UInteger, iDecompressionEngine As Ushort = COMPRESSION_FORMAT_LZNT1) As Ubyte Ptr
- 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)
- Declare Function _GDIPlus_BitmapCreateFromMemory3(aBinImage As Ubyte Ptr, iLen As Ulong, bBitmap_GDI As Bool = False) As Any Ptr
- 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
- Declare Function Base91Decode(sString As String, Byref iBase91Len As Ulong) As Ubyte Ptr
- Declare Function Base91Encode(binArray As Ubyte Ptr, iLen as ulong, ByRef iLenOut as Ulong) As String
- Declare Function Base128Encode(binArray As Ubyte Ptr, iLen as ulong, ByRef iLenOut as Ulong) As String
- Declare Function DecompressImage(sLabel as string) As Any Ptr
- Declare Function DecompressHorseAnim() As Any Ptr
- Declare Sub DecompressSID()
- 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
- 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
- 'Simple lzfx encoder - decoder without dependancies -> https://www.freebasic.net/forum/viewtopic.php?f=7&t=27188#p254954
- Declare Function lzfx_compress(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong , Byval obuf As Ubyte Ptr , Byref olen As Ulong) As Long
- Declare Function size_comp_buffer(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong ) As Long
- /' Hashtable size (2**LZFX_HLOG entries) '/
- #Ifndef LZFX_HLOG
- # define LZFX_HLOG 16
- #Endif
- /' Predefined errors. '/
- #Define LZFX_ESIZE -1 /' Output buffer too small '/
- #Define LZFX_ECORRUPT -2 /' Invalid Data for decompression '/
- #Define LZFX_EARGS -3 /' Arguments invalid (NULL) '/
- #Define LZFX_HSIZE (1 Shl (LZFX_HLOG))
- /' Define the hash Function '/
- #Define LZFX_FRST(p) (((p[0]) Shl 8) Or p[1])
- #Define LZFX_NEXT(v,p) (((v) Shl 8) Or p[2])
- #Define LZFX_IDX(h) ((( h Shr (3 * 8 - LZFX_HLOG)) - h ) And (LZFX_HSIZE - 1))
- /' These cannot be changed, as they are related to the compressed Format. '/
- #Define LZFX_MAX_LIT (1 Shl 5)
- #Define LZFX_MAX_OFF (1 Shl 13)
- #Define LZFX_MAX_REF ((1 Shl 8) + (1 Shl 3))
- /' This macro to reproduce !a in c'/
- #Define MY_NOT(value) Iif(value = 0, 1, 0)
- 'Simple lzmat encoder - decoder without dependancies -> https://www.freebasic.net/forum/viewtopic.php?f=7&t=27533
- #Ifndef _LZMAT_COMPRESS_BI_
- #Define _LZMAT_COMPRESS_BI_
- #Define _COMPRESSION_LEVEL_ 2
- ' For tweaking the performances
- #Define W_BITS_DEF 19 '' Window size (17..23) 21
- #Define W_SIZE_DEF (1 Shl W_BITS_DEF)
- #Define W_MASK_DEF (W_SIZE_DEF - 1)
- #Define SLOT_BITS_DEF 4 '' 4
- #Define NUM_SLOTS_DEF (1 Shl SLOT_BITS_DEF)
- #Define A_BITS_DEF 1 '' 1 xx 2
- #Define B_BITS_DEF 2 '' 01 xx 2
- #Define C_BITS_DEF 3 '' 001 xx 2
- #Define D_BITS_DEF 5 '' 0001 xxx 3
- #Define E_BITS_DEF 7 '' 00001 xxxxx 5
- #Define F_BITS_DEF 9 '' 00000 xxxxxxxxx 9
- #Define A_DEF (1 Shl A_BITS_DEF)
- #Define B_DEF ((1 Shl B_BITS_DEF) + A_DEF)
- #Define C_DEF ((1 Shl C_BITS_DEF) + B_DEF)
- #Define D_DEF ((1 Shl D_BITS_DEF) + C_DEF)
- #Define E_DEF ((1 Shl E_BITS_DEF) + D_DEF)
- #Define F_DEF ((1 Shl F_BITS_DEF) + E_DEF)
- #Define MIN_MATCH_DEF 3 '' 3
- #Define MAX_MATCH_DEF ((F_DEF - 1) + MIN_MATCH_DEF)
- #Define TOO_FAR_DEF (1 Shl 16)
- #Define HASH1_LEN_DEF MIN_MATCH_DEF
- #Define HASH2_LEN_DEF (MIN_MATCH_DEF + 1)
- #Define HASH1_BITS_DEF 19 '' 21
- #Define HASH2_BITS_DEF 22 '' 24
- #Define HASH1_SIZE_DEF (1 Shl HASH1_BITS_DEF)
- #Define HASH2_SIZE_DEF (1 Shl HASH2_BITS_DEF)
- #Define HASH1_MASK_DEF (HASH1_SIZE_DEF - 1)
- #Define HASH2_MASK_DEF (HASH2_SIZE_DEF - 1)
- #Define HASH1_SHIFT_DEF ((HASH1_BITS_DEF + (HASH1_LEN_DEF - 1)) / HASH1_LEN_DEF)
- #Define HASH2_SHIFT_DEF ((HASH2_BITS_DEF + (HASH2_LEN_DEF - 1)) / HASH2_LEN_DEF)
- #Macro FILL_OUT_MACRO(xbuf , d1 , d2)
- xbuf[d1] = xbuf[d2]
- d1 += 1
- d2 += 1
- #Endmacro
- #Define update_hash1(h, c) Clng((((h) Shl HASH1_SHIFT_DEF) + (c)) And HASH1_MASK_DEF)
- #Define update_hash2(h, c) Clng((((h) Shl HASH2_SHIFT_DEF) + (c)) And HASH2_MASK_DEF)
- Type info_t
- g_inbuf As Ubyte Ptr
- g_outbuf As Ubyte Ptr
- g_inbuf_pos As Long
- g_outbuf_pos As Long
- g_bit_buf As Long
- g_bit_count As Long
- End Type
- Declare Sub init_bits(Byval inbuf As Ubyte Ptr, Byval outbuf As Ubyte Ptr, Byval tinfo As info_t Ptr)
- Declare Sub put_bits(Byval n As Long, Byval x As Long, Byval tinfo As info_t Ptr)
- Declare Sub flush_bits(Byval tinfo As info_t Ptr)
- Declare Function get_bits(Byval n As Long, Byval tinfo As info_t Ptr) As Long
- Declare Function get_min(Byval a As Long, Byval b As Long) As Long
- Declare Function get_max(Byval a As Long, Byval b As Long) As Long
- Declare Function get_penalty(Byval a As Long, Byval b As Long) As Long
- 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
- Declare Function lzmat_check(Byval inbuf As Ubyte Ptr)As Long
- Declare Function lzmat_compressBound(Byval insize As Long)As Long
- #Endif
- Const SC_DRAGMOVE = &hF012, iMaxFilesizeSum = 100 * 1024^2 '100 MB
- Const fPI = Acos(-1), fRad = Acos(-1) / 180, fDeg = 180 / Acos(-1)
- Dim As WNDCLASSEX wc
- Dim As MSG msg
- Dim Shared As HWND hGUI, hPic, hProgressbar
- Dim As Integer sW, sH
- ScreenInfo(sW, sH)
- Dim szAppName As ZString * 6 => "FB GUI"
- Dim Shared As String sTitle
- sTitle = "FB File2Bas Code Generator v1.01 build 2020-05-25 beta"
- Dim Shared As UShort iW, iH
- iW = 160
- iH = 120
- Dim Shared As Short iDefaultPosX, iDefaultPosY
- iDefaultPosX = (sW - iW) \ 2
- iDefaultPosY = (sH - iH) \ 2
- Dim Shared As Ubyte iBaseEncoder = 2, iCompression, bOutputFile, bOutputClipboard, bMaxCompression, bProbeAllCompressors
- iCompression = 6: bOutputFile = 1: bOutputClipboard = 0: bMaxCompression = 1: bProbeAllCompressors = 0
- Dim As Short xPos = CShort(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "x", Str(iDefaultPosX)))
- Dim As Short yPos = Cshort(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "y", Str(iDefaultPosY)))
- iBaseEncoder = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Base", "Encoder", Str(iBaseEncoder)))
- iCompression = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "Engine", Str(iCompression)))
- bMaxCompression = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "MaxCompression", Str(bMaxCompression)))
- bProbeAllCompressors = Cubyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "ProbeAllCompressors", Str(bProbeAllCompressors)))
- bOutputFile = CUbyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Output", "File", Str(bOutputFile)))
- bOutputClipboard = CUbyte(_WinAPI_IniRead(Exepath & "\FB File2Bas Code Generator.ini", "Output", "Clipboard", Str(bOutputClipboard)))
- iBaseEncoder = Iif(iBaseEncoder < 0, 0, Iif(iBaseEncoder > 2, 2, iBaseEncoder))
- iCompression = Iif(iCompression < 0, 0, Iif(iCompression > 7, 7, iCompression))
- Dim Shared As String aBaseEncoder(2)
- aBaseEncoder(0) = "Base64"
- aBaseEncoder(1) = "Base91"
- aBaseEncoder(2) = "Base128"
- Dim Shared As tFileArray aFiles
- Dim Shared As RECT tPos
- Dim Shared As Ubyte bFilesAdded = 0
- Dim Shared As Ushort iFilesAdded = 0
- With wc
- .style = CS_HREDRAW Or CS_VREDRAW
- .lpfnWndProc = @WndProc
- .cbClsExtra = NULL
- .cbWndExtra = NULL
- .hInstance = GetModuleHandle(NULL)
- .hIcon = LoadIcon(.hInstance, "FB_PROGRAM_ICON")
- .hCursor = LoadCursor(NULL, IDC_ARROW)
- .hbrBackground = GetStockObject(WHITE_BRUSH)
- .lpszMenuName = NULL
- .lpszClassName = @szAppName
- .cbSize = SizeOf(WNDCLASSEX)
- End With
- RegisterClassEx(@wc)
- hGUI = CreateWindowEx( WS_EX_TOPMOST Or WS_EX_ACCEPTFILES, _
- wc.lpszClassName, _
- sTitle, _
- WS_VISIBLE Or WS_POPUPWINDOW, _
- xPos, yPos, _
- iW, iH, _
- NULL, NULL, wc.hInstance, NULL)
- 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.")
- hPic = CreateWindowEx(NULL, "Static", "", SS_BITMAP Or WS_CHILD Or WS_VISIBLE, 0, 0, iW, iH, hGUI, NULL, NULL, NULL)
- Dim As HBITMAP hLogo = DecompressImage("__fblogopng")
- SendMessage(hPic, STM_SETIMAGE, IMAGE_BITMAP, Cast(LPARAM, hLogo))
- Dim As RECT rcClient
- GetClientRect(hGUI, @rcClient)
- Dim As Integer cyVScroll = GetSystemMetrics(SM_CYVSCROLL)
- hProgressbar = CreateWindowEx( 0, PROGRESS_CLASS, NULL, _
- WS_CHILD or WS_VISIBLE Or PBS_SMOOTH, _
- rcClient.left, rcClient.bottom - 10, _
- rcClient.right, cyVScroll, _
- hGUI, 0, wc.hInstance, NULL)
- SendMessage(hProgressbar, PBM_SETSTEP, 1, 0)
- SendMessage(hProgressbar, PBM_SETBARCOLOR, 0, Cast(LPARAM, &hFFFFFF)) 'BGR
- SendMessage(hProgressbar, PBM_SETBKCOLOR, 0, Cast(LPARAM, &h0)) 'BGR
- ShowWindow(hGUI, SW_NORMAL)
- Const WM_SHELLNOTIFY = WM_USER + 5, id_EncoderB91 = 5000, id_EncoderB128 = 5001, id_EncoderB64 = 5002, _
- id_OutputFile = 5100, id_OutputClipboard = 5101, _
- id_About = 5200, id_Exit = 5300, _
- id_CompressionDisabled = 5400, id_CompressionLZNT1 = 5401, id_CompressionXPRESS = 5402, id_CompressionXPRESSHUFF = 5403, id_CompressionLZFX = 5405, id_CompressionZLib = 5406, id_CompressionLZMAT = 5407, id_CompressionLZWGfxlib = 5408, _
- id_CompressionMaxCompression = 5450, id_ProbeAllCompressors = 5460, _
- id_TrayReset = 5500, id_TrayExit = 5501, id_TrayAbout = 5502
- Dim Shared As HANDLE hMenuMain, hMenuSub1, hMenuSub2, hMenuSub3
- Dim As HBITMAP hBmpCompress = DecompressImage("__compresspng"), hBmpOutput = DecompressImage("__outputpng"), hBmpAbout = DecompressImage("__aboutpng"), hBmpExit = DecompressImage("__exitpng"), _
- hBmpBase = DecompressImage("__bubblebazina7_24x24png"), hBmpReset = DecompressImage("__resetpng"), hBmpFBIcn = DecompressImage("__fbicnpng")
- 'create popup menu
- hMenuMain = CreatePopupMenu()
- hMenuSub1 = CreatePopupMenu()
- hMenuSub2 = CreatePopupMenu()
- hMenuSub3 = CreatePopupMenu()
- _WinAPI_InsertMenuItem(hMenuMain, 0, "Base encoder", 0, hMenuSub1, hBmpBase)
- _WinAPI_InsertMenuItem(hMenuMain, 1, "Compression", 0, hMenuSub2, hBmpCompress)
- _WinAPI_InsertMenuItem(hMenuMain, 2, "Output to", 0, hMenuSub3, hBmpOutput)
- _WinAPI_InsertMenuItem(hMenuMain, 3, "")
- _WinAPI_InsertMenuItem(hMenuMain, 4, "About", id_About, , hBmpAbout)
- _WinAPI_InsertMenuItem(hMenuMain, 5, "")
- _WinAPI_InsertMenuItem(hMenuMain, 6, "Exit", id_Exit, , hBmpExit)
- _WinAPI_InsertMenuItem(hMenuSub1, 0, aBaseEncoder(0), id_EncoderB64)
- _WinAPI_InsertMenuItem(hMenuSub1, 1, aBaseEncoder(1), id_EncoderB91)
- _WinAPI_InsertMenuItem(hMenuSub1, 2, aBaseEncoder(2), id_EncoderB128)
- CheckMenuRadioItem(hMenuSub1, 0, 2, iBaseEncoder, MF_BYPOSITION)
- _WinAPI_InsertMenuItem(hMenuSub2, 0, "Disabled", id_CompressionDisabled)
- _WinAPI_InsertMenuItem(hMenuSub2, 1, "LZNT (Windows build-in) (default)", id_CompressionLZNT1)
- _WinAPI_InsertMenuItem(hMenuSub2, 2, "XPRESS (Windows build-in)", id_CompressionXPRESS) 'available on Win8+ os
- _WinAPI_InsertMenuItem(hMenuSub2, 3, "XPRESS HUFFmann (Windows build-in)", id_CompressionXPRESSHUFF) 'available on Win8+ os
- _WinAPI_InsertMenuItem(hMenuSub2, 4, "LZFX (experimental)", id_CompressionLZFX)
- _WinAPI_InsertMenuItem(hMenuSub2, 5, "ZLib", id_CompressionZLib)
- _WinAPI_InsertMenuItem(hMenuSub2, 6, "LZMAT (experimental)", id_CompressionLZMAT)
- _WinAPI_InsertMenuItem(hMenuSub2, 7, "LZW from GfxLib", id_CompressionLZWGfxlib)
- Dim Shared As Ubyte iMaxMenuSub2Items = 7
- _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 1, "")
- _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 2, "Use max compression", id_CompressionMaxCompression)
- _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 3, "")
- _WinAPI_InsertMenuItem(hMenuSub2, iMaxMenuSub2Items + 4, "Probe all compressors (might be slow!)", id_ProbeAllCompressors)
- _WinAPI_InsertMenuItem(hMenuSub3, 0, "File", id_OutputFile)
- _WinAPI_InsertMenuItem(hMenuSub3, 1, "Clipboard", id_OutputClipboard)
- If OS.dwBuildNumber < 9200 Then
- EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_DISABLED or MF_GRAYED)
- If iCompression = 2 Or iCompression = 3 Then iCompression = 1
- End If
- 'Region Tray Menu
- Dim Shared As HMENU TrayMenu, MainMenu
- MainMenu = CreateMenu()
- TrayMenu = CreateMenu()
- Dim Shared As NOTIFYICONDATA SystrayIcon
- 'Dim HICON As hIcon = ExtractIcon(GetModuleHandle(0), Command(0), 0)
- Dim As ICONINFO tIcon
- tIcon.fIcon = True
- tIcon.fIcon = True
- tIcon.hbmMask = hBmpFBIcn
- tIcon.hbmColor = hBmpFBIcn
- Dim HICON As hIcon = CreateIconIndirect(@tIcon)
- With SystrayIcon
- .cbSize = Len(SystrayIcon)
- .hWnd = hGUI
- .uId = 1&
- .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
- .uCallbackMessage = WM_SHELLNOTIFY
- .hIcon = hIcon
- .szTip = sTitle + Chr(0)
- End With
- AppendMenu(TrayMenu, MF_STRING, id_TrayReset, "&Reset Windows Position")
- AppendMenu(TrayMenu, MF_SEPARATOR, 0, 0)
- AppendMenu(TrayMenu, MF_STRING, id_TrayAbout, "&About")
- AppendMenu(TrayMenu, MF_SEPARATOR, 0, 0)
- AppendMenu(TrayMenu, MF_STRING, id_TrayExit, "&Exit")
- InsertMenu(MainMenu, 0, MF_POPUP, Cptr(UINT_PTR, TrayMenu), 0)
- SetMenuItemBitmaps(TrayMenu, id_TrayReset, MF_BYCOMMAND, hBmpReset, hBmpReset)
- SetMenuItemBitmaps(TrayMenu, id_TrayAbout, MF_BYCOMMAND, hBmpAbout, hBmpAbout)
- SetMenuItemBitmaps(TrayMenu, id_TrayExit, MF_BYCOMMAND, hBmpExit, hBmpExit)
- Shell_NotifyIcon(NIM_ADD, @SystrayIcon)
- Dim As MENUINFO tMenuBgColor
- With tMenuBgColor
- .cbSize = Sizeof(MENUINFO)
- .fMask = MIM_BACKGROUND
- .hbrBack = GetSysColorBrush(COLOR_HIGHLIGHTTEXT)
- End With
- SetMenuInfo(TrayMenu, Cast(LPCMENUINFO, @tMenuBgColor))
- iCompression = Iif(iCompression < 0, 0, Iif(iCompression > iMaxMenuSub2Items, iMaxMenuSub2Items, iCompression))
- Select Case iCompression
- Case 0 'no compression
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 1 'COMPRESSION_FORMAT_LZNT1
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 2 'COMPRESSION_FORMAT_XPRESS
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 3 'COMPRESSION_FORMAT_XPRESS_HUFF
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 4 'internal LZFX compression format
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 5 'ZLib compression format
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 6 'internal LZMAT compression format
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- Case 7 'LZW-Codec within GfxLib
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, iCompression, MF_BYPOSITION)
- End Select
- If bOutputFile Then CheckMenuItem(hMenuSub3, id_OutputFile, MF_CHECKED)
- If bOutputClipboard Then CheckMenuItem(hMenuSub3, id_OutputClipboard, MF_CHECKED)
- If bMaxCompression Then CheckMenuItem(hMenuSub2, id_CompressionMaxCompression, MF_CHECKED)
- If bProbeAllCompressors Then
- CheckMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_CHECKED)
- EnableMenuItem(hMenuSub2, id_CompressionDisabled, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZNT1, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZFX, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionZLib, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZMAT, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZWGfxlib, MF_DISABLED or MF_GRAYED)
- Endif
- If iCompression = 0 Then EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_DISABLED or MF_GRAYED)
- Dim Shared As HCURSOR hAnim
- hAnim = DecompressHorseAnim()
- While GetMessage(@msg, 0, 0, 0)
- TranslateMessage(@msg)
- DispatchMessage(@msg)
- 'If InKey = Chr(27) Then Exit While
- Wend
- Shell_NotifyIcon(NIM_DELETE, @SystrayIcon)
- DestroyIcon(hIcon)
- DestroyCursor(hAnim)
- DeleteObject(hLogo)
- DeleteObject(hBmpBase)
- DeleteObject(hBmpCompress)
- DeleteObject(hBmpOutput)
- DeleteObject(hBmpExit)
- DeleteObject(hBmpAbout)
- DeleteObject(hBmpReset)
- DeleteObject(hBmpFBIcn)
- GdiplusShutdown(gdipToken)
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "x", Str(tPos.Left))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "GUI", "y", Str(tPos.Top))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Base", "Encoder", Str(iBaseEncoder))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "Engine", Str(iCompression))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "MaxCompression", Str(bMaxCompression))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Compression", "ProbeAllCompressors", Str(bProbeAllCompressors))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Output", "File", Str(bOutputFile))
- _WinAPI_IniWrite(Exepath & "\FB File2Bas Code Generator.ini", "Output", "Clipboard", Str(bOutputClipboard))
- End
- Private Sub About(fDAngle As Single = 180)
- If Fileexists(Curdir & "\Unicornflakes.sid") <> -1 Then DecompressSID()
- Dim As __tagSIDInfo SID
- Dim As __TitchySID TitchySID
- TitchySID.Open(Curdir & "\Unicornflakes.sid", 0)
- Dim As UShort iW = 600, iH = 600, fCx = iW \ 2, fCy = iH \ 2
- 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 ..............."
- Dim As Ushort iLen = Len(sText)
- Dim as Short i
- Dim As String aText(0 To iLen - 1)
- For i = 0 To iLen - 1
- aText(i) = Mid(sText, iLen - i, 1)
- Next
- Type tagChars
- As Single x, y
- As Any Ptr img, gfx
- End Type
- Dim As tagChars tCoord(iLen - 1)
- Dim As Single fSize = iLen / Sqr((iW * iW) + (iH * iH)) * 512, fSize2 = fSize * 2
- Dim As Single fDegree, fAngle, mwx, mwy, fFontSize, f1, f2, c1 = fSize / 2, c2 = fSize2 / 2, fRadius = Sqr((iW * iW) / 10 + (iH * iH) / 10), _
- iDX = -fSize / 2, iDY = iDX, c3, c4 = iLen / 6, c5 = 0.85 * Sqr((iW * iW) / 2 + (iH * iH) / 2) / 2, _
- c6 = (iH / iW), c7 = (iW / iH)
- ScreenControl SET_DRIVER_NAME, "GDI"
- ScreenRes iW, iH, 32, 1, GFX_HIGH_PRIORITY Or GFX_NO_SWITCH Or GFX_ALWAYS_ON_TOP Or GFX_HIGH_PRIORITY Or &h80000000
- WindowTitle "About"
- 'center windows by adding the taskbar to the calculation
- Dim as Integer iDW, iDH
- ScreenControl GET_DESKTOP_SIZE, iDW, iDH
- Dim tWorkingArea As RECT
- SystemParametersInfo(SPI_GETWORKAREA, null, @tWorkingArea, null)
- ScreenControl SET_WINDOW_POS, (iDW - iW) \ 2, ((tWorkingArea.Bottom - iH) - (iDH - tWorkingArea.Bottom)) \ 2
- Dim as HWND hHWND
- ScreenControl(GET_WINDOW_HANDLE, Cast(Integer, hHWND))
- 'init GDI / GDI+ canvas, pens, brushes, etc. for drawing
- Dim As BITMAPINFO tBITMAP
- With tBITMAP.bmiheader
- .biSize = Sizeof(BITMAPINFOHEADER)
- .biWidth = iW
- .biHeight = -iH
- .biPlanes = 1
- .biBitCount = 32
- .biCompression = BI_RGB
- End With
- Dim As GpRectF tLayout, tLayout2
- tLayout2.x = 0
- tLayout2.y = 0
- tLayout2.width = fSize
- tLayout2.height = fSize / 2
- Dim As Ulong Ptr aBitmap
- Dim As Any Ptr hDC = GetDC(hHWND), _
- hHBitmap = CreateDIBSection(hDC, @tBITMAP, DIB_RGB_COLORS, @aBitmap, NULL, NULL), _
- hDC_backbuffer = CreateCompatibleDC(hDC), _
- hObjOld, hCanvas, hPen, hPen2, hBrush, hBrush2, hBrush_c, hMatrix, hMatrix2, hFont, hFamily, hFormat, hBitmap, hGfx, _
- hBitmap_Cursor, hGfx_Cursor, hBitmap_Bg, hGfx_Bg, hPath
- hObjOld = SelectObject(hDC_backbuffer, hHBitmap)
- GdipCreateFromHDC(hDC_backbuffer, @hCanvas)
- GdipSetSmoothingMode(hCanvas, 6) '6 = 8x8 aa
- GdipSetPixelOffsetMode(hCanvas, PixelOffsetModeHalf)
- 'GdipSetInterpolationMode(hCanvas, InterpolationModeHighQualityBicubic)
- GdipSetCompositingQuality(hCanvas, CompositingQualityGammaCorrected)
- GdipGraphicsClear(hCanvas, &hFF606E8C)
- GdipCreatePen1(&h28101010, 1, 2, @hPen)
- GdipSetPenStartCap(hPen, &h14)
- GdipCreatePen1(&h78101010, 8, 2, @hPen2)
- GdipCreateLineBrushFromRectWithAngle(@tLayout2, &hD0202080, &hF06060FF, 45, 1, 0, @hBrush)
- GdipSetLineSigmaBlend(hBrush, 0.5, 0.95)
- GdipCreateBitmapFromScan0(iW, iH, 0, PixelFormat32bppARGB, 0, @hBitmap_Bg)
- GdipGetImageGraphicsContext(hBitmap_Bg, @hGfx_Bg)
- GdipSetSmoothingMode(hGfx_Bg, 6)
- GdipSetPixelOffsetMode(hGfx_Bg, PixelOffsetModeHalf)
- Dim As GpPointF tPoint
- tPoint.x = fCx
- tPoint.y = fCy
- Dim As Ulong iCnt = 1, iColor = &hFFB0B0B0
- GdipCreatePath(0, @hPath)
- GdipAddPathEllipse(hPath, 4, 4, iW - 9, iH - 9)
- GdipCreatePathGradientFromPath(hPath, @hBrush2)
- GdipSetPathGradientCenterColor(hBrush2, &hF0FFFFFF)
- GdipSetPathGradientCenterPoint(hBrush2, @tPoint)
- GdipSetPathGradientSurroundColorsWithCount(hBrush2, @iColor, @iCnt)
- GdipSetPathGradientGammaCorrection(hBrush2, True)
- GdipFillEllipse(hGfx_Bg, hBrush2, 4, 4, iW - 9, iH - 9)
- GdipDrawEllipse(hGfx_Bg, hPen2, 4, 4, iW - 9, iH - 9)
- GdipCreateSolidFill(&hFF200000, @hBrush_c)
- GdipCreateStringFormat(0, 0, @hFormat)
- GdipCreateFontFamilyFromName("Consolas", 0, @hFamily)
- GdipCreateBitmapFromScan0(iW, iH, 0, PixelFormat32bppARGB, 0, @hBitmap)
- GdipGetImageGraphicsContext(hBitmap, @hGfx)
- GdipSetSmoothingMode(hGfx, 6)
- GdipSetPixelOffsetMode(hGfx, PixelOffsetModeHalf)
- GdipSetInterpolationMode(hGfx, InterpolationModeHighQualityBicubic)
- GdipSetCompositingQuality(hGfx, CompositingQualityGammaCorrected)
- GdipCreateBitmapFromScan0(fSize2, fSize2, 0, PixelFormat32bppARGB, 0, @hBitmap_Cursor)
- GdipGetImageGraphicsContext(hBitmap_Cursor, @hGfx_Cursor)
- GdipSetSmoothingMode(hGfx_Cursor, 6)
- GdipSetPixelOffsetMode(hGfx_Cursor, PixelOffsetModeHalf)
- GdipSetInterpolationMode(hGfx_Cursor, InterpolationModeHighQualityBicubic)
- GdipSetCompositingQuality(hGfx_Cursor, CompositingQualityGammaCorrected)
- GdipCreateMatrix(@hMatrix)
- GdipCreateMatrix(@hMatrix2)
- GdipSetStringFormatAlign(hFormat, StringAlignmentCenter)
- GdipSetStringFormatLineAlign(hFormat, StringAlignmentCenter)
- For i = 0 To iLen - 1
- GdipCreateBitmapFromScan0(fSize, fSize, 0, PixelFormat32bppARGB, 0, @tCoord(i).img)
- GdipGetImageGraphicsContext(tCoord(i).img, @tCoord(i).gfx)
- GdipSetSmoothingMode(tCoord(i).gfx, 6)
- GdipSetPixelOffsetMode(tCoord(i).gfx, PixelOffsetModeHalf)
- GdipSetTextRenderingHint(tCoord(i).gfx, TextRenderingHintAntiAliasGridFit)
- Next
- Dim As Bool bSkipSleep = False
- For i = iLen - 1 To 0 Step - 1
- GdipDrawImageRect(hCanvas, hBitmap_Bg, 0, 0, iW, iH)
- GdipDrawImageRect(hCanvas, hBitmap, 0, 0, iW, iH)
- fDegree = fDAngle + iLen / c4 * i
- tCoord(i).x = fCx + Sin(fDegree * fRad) * fRadius / c6
- tCoord(i).y = fCy + Cos(fDegree * fRad) * fRadius / c7
- fRadius -= c5 / iLen
- fFontSize = fRadius / 7
- mwx = tCoord(i).x - fCx
- mwy = fCy - tCoord(i).y
- c3 = (mwx + Sqr(mwx * mwx + mwy * mwy))
- fAngle = 2 * -ATn(mwy / c3) * fDeg
- If c3 = 0 Then
- If mwx < 0 Then
- fAngle = -180
- Else
- fAngle = 180
- End If
- End If
- f1 = iDX + c1
- f2 = iDY + c1
- If i < (iLen - 1) Then
- GdipSetPenWidth(hPen, fFontSize / 8)
- GdipDrawLine(hCanvas, hPen, tCoord(i).x + f1, tCoord(i).y + f2, tCoord(i + 1).x + f1, tCoord(i + 1).y + f2)
- GdipDrawLine(hGfx, hPen, tCoord(i).x + f1, tCoord(i).y + f2, tCoord(i + 1).x + f1, tCoord(i + 1).y + f2)
- Endif
- GdipSetMatrixElements(hMatrix, 1, 0, 0, 1, 0, 0)
- GdipTranslateMatrix(hMatrix, c1, c1, False)
- GdipRotateMatrix(hMatrix, 90 + fAngle, False)
- GdipTranslateMatrix(hMatrix, -c1, -c1, False)
- GdipSetWorldTransform(tCoord(i).gfx, hMatrix)
- GdipSetMatrixElements(hMatrix2, 1, 0, 0, 1, 0, 0)
- GdipTranslateMatrix(hMatrix2, c2, c2, False)
- GdipRotateMatrix(hMatrix2, 90 + fAngle, False)
- GdipTranslateMatrix(hMatrix2, -c2, -c2, False)
- GdipSetWorldTransform(hGfx_Cursor, hMatrix2)
- GdipGraphicsClear(hGfx_Cursor, 0)
- GdipFillRectangle(hGfx_Cursor, hBrush_c, fSize * 0.475, fSize * 0.1, fSize * 1.05, fSize * 1.55)
- fFontSize = Iif(fFontSize < 0.5, 0.5, fFontSize)
- GdipCreateFont(hFamily, fFontSize, 0, 3, @hFont)
- tLayout.x = 0
- tLayout.y = 0
- tLayout.width = fSize
- tLayout.height = fSize
- GdipDrawString(tCoord(i).gfx, aText(i), -1, hFont, @tLayout, hFormat, hBrush)
- GdipDrawImageRect(hCanvas, tCoord(i).img, iDX + tCoord(i).x, iDY + tCoord(i).y, fSize, fSize)
- GdipDrawImageRect(hGfx, tCoord(i).img, iDX + tCoord(i).x, iDY + tCoord(i).y, fSize, fSize)
- GdipDrawImageRect(hCanvas, hBitmap_Cursor, tCoord(i).x + f1 - fFontSize, tCoord(i).y + f2 - fFontSize, fFontSize * 2, fFontSize * 2)
- 'GdipDrawLine(hCanvas, hPen2, 0, fCy, iW, fCy)
- 'GdipDrawLine(hCanvas, hPen2, fCx, 0, fCx, iH)
- BitBlt(hDC, 0, 0, iW, iH, hDC_backbuffer, 0, 0, SRCCOPY)
- GdipDeleteFont(hFont)
- GdipGraphicsClear(hCanvas, &hFF606E8C)
- If bSkipSleep = False Then Sleep(175)
- If InKey = Chr(32) Then bSkipSleep = True
- Next
- GdipSetMatrixElements(hMatrix, 1, 0, 0, 1, 0, 0)
- Dim e As Event
- Do
- GdipTranslateMatrix(hMatrix, fCx, fCy, False)
- GdipRotateMatrix(hMatrix, -0.2, False)
- GdipTranslateMatrix(hMatrix, -fCx, -fCy, False)
- GdipSetWorldTransform(hCanvas, hMatrix)
- GdipDrawImageRect(hCanvas, hBitmap_Bg, 0, 0, iW, iH)
- GdipDrawImageRect(hCanvas, hBitmap, 0, 0, iW, iH)
- BitBlt(hDC, 0, 0, iW, iH, hDC_backbuffer, 0, 0, SRCCOPY)
- GdipGraphicsClear(hCanvas, &hFF606E8C)
- Sleep(1, 1)
- If (ScreenEvent(@e)) Then
- Select Case e.type
- Case EVENT_WINDOW_CLOSE
- Exit Do
- End Select
- End If
- Loop Until InKey = Chr(27) or InKey = Chr(255,107)
- GdipDeletePath(hPath)
- GdipDeleteFontFamily(hFamily)
- GdipDeleteStringFormat(hFormat)
- GdipDeletePen(hPen)
- GdipDeletePen(hPen2)
- GdipDeleteBrush(hBrush)
- GdipDeleteBrush(hBrush2)
- GdipDeleteBrush(hBrush_c)
- GdipDeleteMatrix(hMatrix)
- GdipDeleteMatrix(hMatrix2)
- For i = 0 To iLen - 1
- GdipDeleteGraphics(tCoord(i).gfx)
- GdipDisposeImage(tCoord(i).img)
- Next
- GdipDeleteGraphics(hGfx)
- GdipDisposeImage(hBitmap)
- GdipDeleteGraphics(hGfx_Cursor)
- GdipDisposeImage(hBitmap_Cursor)
- GdipDeleteGraphics(hGfx_Bg)
- GdipDisposeImage(hBitmap_Bg)
- SelectObject(hDC_backbuffer, hObjOld)
- DeleteDC(hDC_backbuffer)
- ReleaseDC(hHWND, hDC)
- TitchySID.Stop()
- TitchySID.Close()
- Screenres iW, iH, 32, , GFX_NULL 'send GUI to nirvana
- 'DestroyWindow(hHWND) 'doesn't work
- 'SendMessage(hHWND, WM_CLOSE, 0, 0) 'doesn't work
- End Sub
- Sub BaseEncoder(aFiles As tFileArray, iLineLen As Ushort = iLineCharLen)
- Dim As Uinteger iFileSize, iCompressedSize, iSizeBase
- Dim As Integer hFile
- Dim As Ulong i, j, iCompressionFormatAndEngine = 0, iChars, iLines, iCompression_tmp
- Dim As Ubyte Ptr pMem, pMemCompressed
- Dim As String sBaseEncoded, sCodeFile, sBaseCode = "'Code below was generated by: " & sTitle & CRLF & CRLF, sLine, sHeader, sInfo
- SendMessage(hProgressbar, PBM_SETRANGE, 0, MAKELPARAM(0, Ubound(aFiles.files) + 1))
- SendMessage(hProgressbar, PBM_SETPOS, 0, 0)
- For i = 0 To Ubound(aFiles.files)
- SendMessage(hProgressbar, PBM_STEPIT, 0, 0)
- iFileSize = Filelen(aFiles.files(i))
- pMem = Allocate(iFileSize)
- hFile = Freefile()
- Open aFiles.files(i) For Binary Access Read As #hFile
- Get #hFile, 0, pMem[0], iFileSize
- Close #hFile
- iSizeBase = 0
- iCompression_tmp = iCompression
- If iCompression Then
- If bProbeAllCompressors Then
- Dim As Ubyte iBest = 0, j
- Static As Uinteger iProbeSize = &hFFFFFFFF
- Dim As Ubyte Ptr aMemCompressed(2 To 8)
- ? "1: Orignial file size: ", iFileSize
- sInfo &= "1: Orignial file size: " & Chr(09) & Format(iFileSize, "000000000") & CRLF
- For j = 2 To Ubound(aMemCompressed)
- Select Case j
- Case 2 To 4
- aMemCompressed(j) = _WinAPI_RtlCompress(pMem, iFileSize, iCompressedSize, bMaxCompression, j)
- ? j & ": WinAPI RTL (" & Iif(j = 2, "LZNT", Iif(j = 3, "XPRESS", "XPRESS H")) & "): ", iCompressedSize
- sInfo &= j & ": WinAPI RTL (" & Iif(j = 2, "LZNT", Iif(j = 3, "XPRESS", "XPRESS H")) & "): " & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
- Case 5
- Dim As Ulong iMem = iFileSize Shl 2
- aMemCompressed(j) = Allocate(iMem)
- iCompressedSize = iMem
- lzfx_compress(pMem, iFileSize, aMemCompressed(j), iCompressedSize)
- ? j & ": LZFX: ",, iCompressedSize
- sInfo &= j & ": LZFX: " & Chr(09) & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
- Case 6
- iCompressedSize = compressBound(iFileSize)
- aMemCompressed(j) = Allocate(iCompressedSize)
- compress(aMemCompressed(j), @iCompressedSize, pMem, iFileSize)
- ? j & ": zlib: ",, iCompressedSize
- sInfo &= j & ": zlib: " & Chr(09) & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
- Case 7
- Dim As Ulong iMem = iFileSize Shl 2
- aMemCompressed(j) = Allocate(iMem)
- iCompressedSize = lzmat_compress(aMemCompressed(j), iMem, pMem, iFileSize, _COMPRESSION_LEVEL_ - Iif(bMaxCompression, 0, 2))
- ? j & ": LZMAT: ",, iCompressedSize
- sInfo &= j & ": LZMAT: " & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
- Case 8
- aMemCompressed(j) = Allocate(iFileSize)
- iCompressedSize = iFileSize
- LZW_Encode(pMem, iFileSize, aMemCompressed(j), iCompressedSize)
- ? j & ": LZW: ",,, iCompressedSize
- sInfo &= j & ": LZW: " & Chr(09) & Chr(09) & Chr(09) & Format(iCompressedSize, "000000000") & CRLF
- End Select
- If iCompressedSize < iProbeSize And iCompressedSize < iFileSize Then
- iProbeSize = iCompressedSize
- iBest = j
- iCompressionFormatAndEngine = j
- End If
- Next
- ?
- ? "Best compression: " & iBest
- ? "------------------------------"
- sInfo &= CRLF & "Best compression: " & iBest & CRLF & "------------------------------" & CRLF & CRLF
- For j = 2 To Ubound(aMemCompressed)
- If j <> iBest Then Deallocate(aMemCompressed(j))
- Next
- iCompressedSize = Iif(iProbeSize = &hFFFFFFFF, 0, iProbeSize)
- pMemCompressed = aMemCompressed(iBest)
- iCompression = iBest - 1
- iCompression_tmp = iCompression
- iProbeSize = &hFFFFFFFF
- Select Case iCompression
- Case 1
- iCompressionFormatAndEngine = COMPRESSION_FORMAT_LZNT1
- Case 2
- iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS
- Case 3
- iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS_HUFF
- Case 4
- iCompressionFormatAndEngine = 5 'LZFX
- Case 5
- iCompressionFormatAndEngine = 6 'ZLib
- Case 6
- iCompressionFormatAndEngine = 7 'LZMAT
- Case 7
- iCompressionFormatAndEngine = 8 'LZW
- End Select
- Else
- Select Case iCompression
- Case 1
- iCompressionFormatAndEngine = COMPRESSION_FORMAT_LZNT1
- Case 2
- iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS
- Case 3
- iCompressionFormatAndEngine = COMPRESSION_FORMAT_XPRESS_HUFF
- End Select
- If iCompression < 4 Then 'use windows built-in api for compression
- pMemCompressed = _WinAPI_RtlCompress(pMem, iFileSize, iCompressedSize, bMaxCompression, iCompressionFormatAndEngine)
- ' hFile = Freefile()
- ' Open "Test.bin" For Binary Access Write As #hFile
- ' Put #hFile, 0, pMemCompressed[0], iCompressedSize
- ' Close #hFile
- Else
- Select Case iCompression
- Case 4 'LZFX
- Dim As Ulong iMem = iFileSize Shl 2
- pMemCompressed = Allocate(iMem)
- iCompressedSize = iMem
- lzfx_compress(pMem, iFileSize, pMemCompressed, iCompressedSize)
- iCompressionFormatAndEngine = 5
- Case 5 'ZLib
- iCompressedSize = compressBound(iFileSize)
- pMemCompressed = Allocate(iCompressedSize)
- compress(pMemCompressed, @iCompressedSize, pMem, iFileSize)
- iCompressionFormatAndEngine = 6
- Case 6 'LZMAT
- Dim As Ulong iMem = iFileSize Shl 2
- pMemCompressed = Allocate(iMem)
- iCompressedSize = lzmat_compress(pMemCompressed, iMem, pMem, iFileSize, _COMPRESSION_LEVEL_ - Iif(bMaxCompression, 0, 2))
- iCompressionFormatAndEngine = 7
- Case 7 'LZW
- 'Screenres 1, 1, 1, GFX_NULL, GFX_NO_FRAME
- pMemCompressed = Allocate(iFileSize)
- iCompressedSize = iFileSize
- LZW_Encode(pMem, iFileSize, pMemCompressed, iCompressedSize)
- iCompressionFormatAndEngine = 8
- End Select
- Endif
- End If
- If iCompressedSize >= iFileSize Or iCompressedSize = 0 Then
- Select Case iBaseEncoder
- Case 0
- sBaseEncoded = _WinAPI_Base64Encode(pMem, iFileSize, iSizeBase)
- Case 1
- sBaseEncoded = Base91Encode(pMem, iFileSize, iSizeBase)
- Case 2
- sBaseEncoded = Base128Encode(pMem, iFileSize, iSizeBase)
- End Select
- iCompression_tmp = 0
- iCompressedSize = 0
- ? "Compressed size larger than original file size. Compression skipped..."
- MessageBox(hGUI, "Compressed size larger than original file size. Compression skipped...", "Information", MB_ICONINFORMATION Or MB_OK)
- Else
- Select Case iBaseEncoder
- Case 0
- sBaseEncoded = _WinAPI_Base64Encode(pMemCompressed, iCompressedSize, iSizeBase)
- Case 1
- sBaseEncoded = Base91Encode(pMemCompressed, iCompressedSize, iSizeBase)
- Case 2
- sBaseEncoded = Base128Encode(pMemCompressed, iCompressedSize, iSizeBase)
- End Select
- End If
- Deallocate(pMemCompressed)
- Else
- Select Case iBaseEncoder
- Case 0
- sBaseEncoded = _WinAPI_Base64Encode(pMem, iFileSize, iSizeBase)
- Case 1
- sBaseEncoded = Base91Encode(pMem, iFileSize, iSizeBase)
- Case 2
- sBaseEncoded = Base128Encode(pMem, iFileSize, iSizeBase)
- End Select
- End If
- Deallocate(pMem)
- '? "Base string length: " & Len(sBaseEncoded)
- sCodeFile = ""
- iLines = 0
- iChars = 0
- sLine = ""
- If iSizeBase > iLineLen Then
- For j = 1 To iSizeBase
- sLine &= Mid(sBaseEncoded, j, 1)
- iChars += 1
- If iChars = iLineLen Then
- iChars = 0
- sCodeFile &= "Data """ & sLine & """" & CRLF
- iLines += 1
- sLine = ""
- End If
- Next
- If sLine <> "" Then
- sCodeFile &= "Data """ & sLine & """" & CRLF
- iLines += 1
- End If
- Else
- iLines = 1
- sCodeFile &= "Data """ & sBaseEncoded & """" & CRLF
- End If
- sHeader = "'" & Right(aFiles.files(i), Len(aFiles.files(i)) - Instrrev(aFiles.files(i), "\")) & CRLF & _
- "__Label" & i & ":" & CRLF & _
- "Data " & iLines & "," & Iif(iCompression <> iCompression_tmp, 0, iCompressionFormatAndEngine) & "," & iFileSize & "," & iCompressedSize & ",""" & aBaseEncoder(iBaseEncoder) & """" & CRLF
- sBaseCode &= sHeader & sCodeFile & Iif(Ubound(aFiles.files) > i, CRLF & CRLF, "")
- Next
- If bProbeAllCompressors And Ubound(aFiles.files) < 6 Then MessageBox(hGUI, sInfo, "Information", MB_ICONINFORMATION Or MB_OK)
- SendMessage(hProgressbar, PBM_SETPOS, 0, 0)
- _WinAPI_FlashWindowEx(hGUI)
- If bOutputClipboard Then
- Dim As Byte hClipboard = OpenClipboard(hGUI)
- If hClipboard = 0 Then
- MessageBox(hGUI, "Error opening the clipboard", "ERROR", MB_OK)
- Else
- If EmptyClipboard() = 0 Then
- CloseClipboard()
- MessageBox(hGUI, "Error cleaning the clipboard", "ERROR", MB_OK)
- Else
- Dim As Any Ptr pMemClip, hMemClip = GlobalAlloc(GMEM_MOVEABLE Or GMEM_SHARE, Len(sBaseCode) + 1)
- pMemClip = GlobalLock(hMemClip)
- CopyMemory(pMemClip, Strptr(sBaseCode), Len(sBaseCode))
- GlobalUnlock(pMemClip)
- SetClipboardData(CF_TEXT, hMemClip)
- CloseClipboard()
- MessageBox(hGUI, "Generated code (" & Len(sBaseCode) & " bytes) has been copied to clipboard.", "Information", MB_ICONINFORMATION Or MB_OK)
- GlobalFree(hMemClip)
- End If
- End If
- End If
- If bOutputFile Then
- Dim As Ubyte bSaveFile = 1
- Dim As String sFile = FileSaveDialog("Save generated FB code", "", "FreeBasic (*.bas)" + Chr(0) + "*.bas" + Chr(0))
- If sFile <> "" Then
- If Fileexists(sFile) Then
- If MessageBox(hGUI, "File exists - overwrite?", "Warning", MB_YESNO Or MB_ICONQUESTION) = 7 Then bSaveFile = 0
- End If
- If bSaveFile Then
- hFile = Freefile()
- If Right(sFile, 4) <> ".bas" Then sFile = sFile & ".bas"
- Open sFile For Binary Access Write As #hFile
- Put #hFile, 0, sBaseCode
- Close #hFile
- MessageBox(hGUI, "Generated code has been saved to disk.", "Information", MB_ICONINFORMATION Or MB_OK)
- End If
- End If
- End If
- _WinAPI_FlashWindowEx(hGUI, FLASHW_STOP)
- End Sub
- Function WndProc(hWnd As HWND, uMsg As UINT, wParam As WPARAM, lParam As LPARAM) As Integer
- Select Case uMsg
- Case WM_SETCURSOR
- SetCursor(Cast(HCURSOR, hAnim))
- Return 0
- Case WM_NOTIFY
- Case WM_SHELLNOTIFY
- If lParam = WM_RBUTTONDOWN Then
- Dim tPOINT As Point
- GetCursorPos(@tPOINT)
- SetForegroundWindow(hWnd)
- TrackPopupMenuEx(TrayMenu, TPM_LEFTALIGN Or TPM_RIGHTBUTTON, tPOINT.x, tPOINT.y, hWnd, NULL)
- PostMessage(hWnd, WM_NULL, 0, 0)
- End If
- Case WM_DROPFILES
- Dim As Ulong iCnt = DragQueryFileW(Cast(HDROP, wParam), -1, 0, 0)
- If iCnt > 0 Then
- bFilesAdded = 0
- iFilesAdded = 0
- Dim As Ulong iSumFileSizes = 0
- Dim As Wstring * 4096 tFiles
- Redim aFiles.files(0 To iCnt - 1)
- For i As Ulong = 0 To iCnt - 1
- DragQueryFileW(Cast(HDROP, wParam), i, Cast(LPWSTR, @tFiles), Sizeof(tFiles))
- If PathIsDirectoryW(tFiles) = 0 Then 'files only
- iSumFileSizes + = Filelen(tFiles)
- If iSumFileSizes > iMaxFilesizeSum Then
- 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)
- Exit For
- End If
- aFiles.files(iFilesAdded) = tFiles
- bFilesAdded = 1
- iFilesAdded += 1
- End If
- Next
- If bFilesAdded Then
- iFilesAdded -= 1
- Redim Preserve aFiles.files(0 To iFilesAdded)
- BaseEncoder(aFiles)
- Return 0
- Else
- MessageBox(hGUI, "No files were added!" & CRLF & "Directories are not supported!", "Information", MB_ICONWARNING Or MB_OK)
- End If
- End If
- Return 0
- Case WM_COMMAND
- Select Case Loword (wParam)
- Case id_TrayReset
- SetWindowPos(hGUI, HWND_TOP, iDefaultPosX, iDefaultPosY, 0, 0, SWP_NOSIZE)
- Return 0
- Case id_Exit, id_TrayExit
- GetWindowRect(hGUI, @tPos)
- DestroyWindow(hGUI)
- Return 0
- Case id_EncoderB64, id_EncoderB91, id_EncoderB128
- Select Case Loword (wParam)
- Case id_EncoderB64
- iBaseEncoder = 0
- CheckMenuRadioItem(hMenuSub1, 0, 2, 0, MF_BYPOSITION)
- Case id_EncoderB91
- iBaseEncoder = 1
- CheckMenuRadioItem(hMenuSub1, 0, 2, 1, MF_BYPOSITION)
- Case id_EncoderB128
- iBaseEncoder = 2
- CheckMenuRadioItem(hMenuSub1, 0, 2, 2, MF_BYPOSITION)
- End Select
- Return 0
- Case id_CompressionDisabled, id_CompressionLZNT1, id_CompressionXPRESS, id_CompressionXPRESSHUFF, id_CompressionLZFX, id_CompressionZlib, id_CompressionLZMAT, id_CompressionLZWGfxlib
- Select Case Loword (wParam)
- Case id_CompressionDisabled
- iCompression = 0
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 0, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_DISABLED or MF_GRAYED)
- Case id_CompressionLZNT1
- iCompression = 1
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 1, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- Case id_CompressionXPRESS
- iCompression = 2
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 2, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- Case id_CompressionXPRESSHUFF
- iCompression = 3
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 3, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- Case id_CompressionLZFX
- iCompression = 4
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 4, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- Case id_CompressionZlib
- iCompression = 5
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 5, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- Case id_CompressionLZMAT
- iCompression = 6
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 6, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- Case id_CompressionLZWGfxlib
- iCompression = 7
- CheckMenuRadioItem(hMenuSub2, 0, iMaxMenuSub2Items, 7, MF_BYPOSITION)
- EnableMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_ENABLED)
- End Select
- Return 0
- Case id_CompressionMaxCompression
- Dim As MENUITEMINFOA tMenu
- tMenu.cbsize = Sizeof(tMenu)
- tMenu.fMask = MIIM_STATE
- GetMenuItemInfoW(hMenuSub2, iMaxMenuSub2Items + 2, TRUE, Cast(LPMENUITEMINFOW, @tMenu))
- If tMenu.fState = MF_CHECKED Then
- CheckMenuItem(hMenuSub2, id_CompressionMaxCompression, MF_UNCHECKED)
- bMaxCompression = 0
- Else
- CheckMenuItem(hMenuSub2, id_CompressionMaxCompression, MF_CHECKED)
- bMaxCompression = 1
- End If
- Return 0
- Case id_ProbeAllCompressors
- Dim As MENUITEMINFOA tMenu
- tMenu.cbsize = Sizeof(tMenu)
- tMenu.fMask = MIIM_STATE
- GetMenuItemInfoW(hMenuSub2, iMaxMenuSub2Items + 4, TRUE, Cast(LPMENUITEMINFOW, @tMenu))
- If tMenu.fState = MF_CHECKED Then
- CheckMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_UNCHECKED)
- bProbeAllCompressors = 0
- EnableMenuItem(hMenuSub2, id_CompressionDisabled, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionLZNT1, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionLZFX, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionZLib, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionLZMAT, MF_ENABLED)
- EnableMenuItem(hMenuSub2, id_CompressionLZWGfxlib, MF_ENABLED)
- Else
- CheckMenuItem(hMenuSub2, id_ProbeAllCompressors, MF_CHECKED)
- bProbeAllCompressors = 1
- EnableMenuItem(hMenuSub2, id_CompressionDisabled, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZNT1, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESS, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionXPRESSHUFF, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZFX, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionZLib, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZMAT, MF_DISABLED or MF_GRAYED)
- EnableMenuItem(hMenuSub2, id_CompressionLZWGfxlib, MF_DISABLED or MF_GRAYED)
- End If
- Return 0
- Case id_OutputFile
- Dim As MENUITEMINFOA tMenu
- tMenu.cbsize = Sizeof(tMenu)
- tMenu.fMask = MIIM_STATE
- GetMenuItemInfoW(hMenuSub3, 0, TRUE, Cast(LPMENUITEMINFOW, @tMenu))
- If tMenu.fState = MF_CHECKED And bOutputClipboard = 1 Then
- CheckMenuItem(hMenuSub3, id_OutputFile, MF_UNCHECKED)
- bOutputFile = 0
- Else
- CheckMenuItem(hMenuSub3, id_OutputFile, MF_CHECKED)
- bOutputFile = 1
- End If
- Return 0
- Case id_OutputClipboard
- Dim As MENUITEMINFOA tMenu
- tMenu.cbsize = Sizeof(tMenu)
- tMenu.fMask = MIIM_STATE
- GetMenuItemInfoW(hMenuSub3, 1, TRUE, Cast(LPMENUITEMINFOW, @tMenu))
- If tMenu.fState = MF_CHECKED And bOutputFile = 1 Then
- CheckMenuItem(hMenuSub3, id_OutputClipboard, MF_UNCHECKED)
- bOutputClipboard = 0
- Else
- CheckMenuItem(hMenuSub3, id_OutputClipboard, MF_CHECKED)
- bOutputClipboard = 1
- End If
- Return 0
- Case id_About, id_TrayAbout
- 'MessageBox(hGUI, sTitle & CRLF & CRLF & "Coded by UEZ", "About", MB_OK)
- About()
- Return 0
- End Select
- Case WM_CONTEXTMENU
- Dim tPOINT As Point
- GetCursorPos(@tPOINT)
- SetForegroundWindow(hWnd)
- TrackPopupMenuEx(hMenuMain, TPM_LEFTALIGN Or TPM_RIGHTBUTTON, tPOINT.x, tPOINT.y, hWnd, NULL)
- PostMessage(hWnd, WM_NULL, 0, 0)
- Return 0
- Case WM_KEYDOWN
- If wParam = VK_ESCAPE Then
- GetWindowRect(hGUI, @tPos)
- DestroyWindow(hGUI)
- Endif
- Return 0
- Case WM_CLOSE, WM_DESTROY
- PostQuitMessage(0)
- Return 0
- Case WM_LBUTTONDOWN 'move GUI
- SendMessageW(hGUI, WM_SYSCOMMAND, SC_DRAGMOVE, 0)
- Return 0
- Case WM_DRAWITEM
- End Select
- Return DefWindowProc(hWnd, uMsg, wParam, lParam)
- End Function
- 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)
- Dim As MENUITEMINFOA tMenuItem
- With tMenuItem
- .cbsize = Sizeof(tMenuItem)
- .wID = iID
- .hSubMenu = hSubMenu
- If sText = "" Then
- .fMask = MIIM_FTYPE
- .fType = MFT_SEPARATOR
- Else
- .fMask = MIIM_ID Or MIIM_STRING Or MIIM_SUBMENU Or MIIM_BITMAP 'Or MIIM_STATE Or MIIM_TYPE
- .fType = MFT_OWNERDRAW Or MFT_STRING
- If hBitmap <> 0 Then .hbmpItem = hBitmap
- End If
- End With
- Dim As Wstring * 260 tMenuText = sText
- tMenuItem.dwTypeData = Cast(LPTSTR, @tMenuText)
- InsertMenuItemW(hMenuMain, iItem, True, Cast(LPCMENUITEMINFOW, @tMenuItem))
- Dim As MENUINFO tMenuBgColor
- With tMenuBgColor
- .cbSize = Sizeof(MENUINFO)
- .fMask = MIM_BACKGROUND
- .hbrBack = GetSysColorBrush(iBGColor)
- End With
- SetMenuInfo(hMenuMain, Cast(LPCMENUINFO, @tMenuBgColor))
- End Sub
- 'https://msdn.microsoft.com/en-us/library/windows/desktop/hh298368(v=vs.85).aspx
- Function _WinAPI_CreateToolTip(hDlg As HWND, sToolTipText As String, bBalloon As Ubyte = 1, iWidth As Ushort = 500, toolID As Integer = 0) As HWND
- If hDlg = 0 Or Len(sToolTipText) = 0 Then Return 0
- If Len(sToolTipText) > 79 Then Left(sToolTipText, 79)
- Dim hToolTip As HWND
- bBalloon = Iif(bBalloon > 1, 1, bBalloon)
- Dim As Long iStyle = bBalloon * TTS_BALLOON
- hToolTip = CreateWindowEx(Null, TOOLTIPS_CLASS, NULL, _
- TTS_NOPREFIX Or TTS_ALWAYSTIP Or TTS_BALLOON Or iStyle, _
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, _
- hDlg, Null, Null, Null)
- If hToolTip = 0 Then Return 0
- SetWindowPos(hToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE)
- SendMessage(hToolTip, TTM_SETTIPBKCOLOR, &hFFFFFF, 0)
- SendMessage(hToolTip, TTM_SETTIPTEXTCOLOR, &h000000, 0)
- SendMessage(hToolTip, TTM_SETMAXTIPWIDTH, 0, iWidth) 'multi line tooltip text
- Dim As HWND hwndTool = GetDlgItem(hDlg, toolID)
- Dim tToolInfo As TOOLINFO
- With tToolInfo
- .cbSize = Sizeof(tToolInfo)
- .uFlags = TTF_SUBCLASS
- .hwnd = hDlg
- .hinst = Null
- .lpszText = Strptr(sToolTipText)
- .uId = Cptr(UINT_PTR, hwndTool)
- End With
- GetClientRect(hDlg, @tToolInfo.rect)
- SendMessage(hToolTip, TTM_ADDTOOL, 0, Cast(LPARAM, @tToolInfo))
- Return hToolTip
- End Function
- 'https://msdn.microsoft.com/en-us/library/ms724353.aspx
- Function _WinAPI_IniRead(sIniFile As String, sSection As String, sKey As String, sDefault As String = "default") As String
- Dim As Zstring * 1024 Buffer
- Dim As Integer iResult = GetPrivateProfileString(sSection, sKey, sDefault, @Buffer, Sizeof(Buffer), sIniFile)
- Return Buffer
- End Function
- 'https://msdn.microsoft.com/en-us/library/ms725500(v=vs.85).aspx
- Function _WinAPI_IniWrite(sIniFile As String, sSection As String, sKey As String, sValue As String = "default") As Integer
- Dim As Zstring * 1024 Buffer
- Dim As Integer iResult = WritePrivateProfileString(sSection, sKey, sValue, sIniFile)
- Return iResult
- End Function
- 'https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-flashwindowex
- Function _WinAPI_FlashWindowEx(hWND As HWND, iFlag As DWORD = FLASHW_ALL, iCount As ULong = 10, iTimeOut As DWORD = 500) As Integer
- Dim As FLASHWINFO tFLASH
- tFlash.cbSize = Sizeof(FLASHWINFO)
- tFlash.hwnd = hGUI
- tFlash.dwFlags = iFlag
- tFlash.uCount = iCount
- tFlash.dwTimeout = iTimeOut
- Return FlashWindowEx(Cast(PFLASHWINFO, @tFLASH))
- End Function
- 'https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-rtlcompressbuffer
- 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
- Dim As Any Ptr hLib = Dylibload("Ntdll.dll")
- Dim pRtlGetCompressionWorkSpaceSize As Function _
- (Byval CompressionFormatAndEngine As Ushort, _
- Byval CompressBufferWorkSpaceSize As UInteger Ptr, _
- Byval CompressFragmentWorkSpaceSize As UInteger Ptr) As UInteger
- Dim pRtlCompressBuffer As Function _
- (Byval CompressionFormatAndEngine As Ushort, _
- Byval UncompressedBuffer As Ubyte Ptr, _
- Byval UncompressedBufferSize As UInteger, _
- Byval CompressedBuffer As Ubyte Ptr, _
- Byval CompressedBufferSize As UInteger, _
- Byval UncompressedBufferSize As UInteger, _
- Byval FinalCompressedSize As UInteger Ptr, _
- Byval WorkSpace As Ubyte Ptr) As UInteger
- pRtlGetCompressionWorkSpaceSize = Dylibsymbol(hLib, "RtlGetCompressionWorkSpaceSize")
- pRtlCompressBuffer = Dylibsymbol(hLib, "RtlCompressBuffer")
- Dim As UInteger iReturn, iCompressBufferWorkSpaceSize, iCompressFragmentWorkSpaceSize, iFinalCompressedSize = 0
- Dim As Ushort iCompressionFormatAndEngine = Iif(bMaxCompression, iCompressionEngine Or COMPRESSION_ENGINE_MAXIMUM, iCompressionEngine)
- iReturn = pRtlGetCompressionWorkSpaceSize(iCompressionFormatAndEngine, @iCompressBufferWorkSpaceSize, @iCompressFragmentWorkSpaceSize)
- Dim As Ubyte Ptr pWorkSpace = Allocate(iCompressBufferWorkSpaceSize), pBuffer = Allocate(2 * iBinarySize)
- iReturn = pRtlCompressBuffer(iCompressionFormatAndEngine, pBinary, iBinarySize, pBuffer, 2 * iBinarySize, 4096, @iFinalCompressedSize, pWorkSpace)
- iCompressedSize = iFinalCompressedSize
- Dim As Ubyte Ptr pCompressedBuffer
- If iFinalCompressedSize > 0 Then
- pCompressedBuffer = Allocate(iFinalCompressedSize)
- For i As UInteger = 0 To iFinalCompressedSize - 1
- pCompressedBuffer[i] = pBuffer[i]
- Next
- End If
- Deallocate(pWorkSpace)
- Deallocate(pBuffer)
- Dylibfree(hLib)
- Return pCompressedBuffer
- End Function
- 'https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-rtldecompressbufferex
- Function _WinAPI_RtlDecompress(aBinary As Ubyte Ptr, iFileSize As UInteger, iCompressedSize As UInteger, iDecompressionEngine As Ushort = COMPRESSION_FORMAT_LZNT1) As Ubyte Ptr
- Dim As Any Ptr hLib = Dylibload("Ntdll.dll")
- Dim pRtlGetCompressionWorkSpaceSize As Function _
- ( Byval CompressionFormatAndEngine As Ushort, _
- Byval CompressBufferWorkSpaceSize As UInteger Ptr, _
- Byval CompressFragmentWorkSpaceSize As UInteger Ptr) As UInteger
- Dim pRtlDecompressBufferEx As Function _
- ( Byval CompressionFormat As Ushort, _
- Byval UncompressedBuffer As Ubyte Ptr, _
- Byval UncompressedBufferSize As UInteger, _
- Byval CompressedBuffer As Ubyte Ptr, _
- Byval CompressedBufferSize As UInteger, _
- Byval FinalUncompressedSize As UInteger Ptr, _
- Byval WorkSpace As UInteger) As UInteger
- pRtlGetCompressionWorkSpaceSize = Dylibsymbol(hLib, "RtlGetCompressionWorkSpaceSize")
- pRtlDecompressBufferEx = Dylibsymbol(hLib, "RtlDecompressBufferEx")
- Dim As UInteger iUSize, iDecompressBufferWorkSpaceSize, iDecompressFragmentWorkSpaceSize, iReturn
- iReturn = pRtlGetCompressionWorkSpaceSize(iDecompressionEngine, @iDecompressBufferWorkSpaceSize, @iDecompressFragmentWorkSpaceSize)
- Dim As Ubyte Ptr pWorkSpace = Allocate(iDecompressBufferWorkSpaceSize), pDecompress = Allocate(iFileSize)
- iReturn = pRtlDecompressBufferEx(iDecompressionEngine, pDecompress, iFileSize, aBinary, iCompressedSize, @iUSize, iDecompressBufferWorkSpaceSize)
- Deallocate(pWorkSpace)
- If iReturn Then
- ? "An Error has occured:"
- Select Case iReturn
- Case &hC0000242
- ? Hex(iReturn) & ": STATUS_BAD_COMPRESSION_BUFFER"
- Case &hC00000E8
- ? Hex(iReturn) & ": STATUS_INVALID_USER_BUFFER"
- Case &hC000025F
- ? Hex(iReturn) & ": STATUS_UNSUPPORTED_COMPRESSION"
- Case &hC000000D
- ? Hex(iReturn) & ": STATUS_INVALID_PARAMETER"
- Case &h00000117
- ? Hex(iReturn) & ": STATUS_BUFFER_ALL_ZEROS"
- Case &hC00000BB
- ? Hex(iReturn) & ": STATUS_NOT_SUPPORTED"
- Case &hC0000023
- ? Hex(iReturn) & ": STATUS_BUFFER_TOO_SMALL"
- End Select
- End If
- Dylibfree(hLib)
- Return pDecompress
- End Function
- 'Original code by KristopherWindsor -> https://www.freebasic.net/forum/viewtopic.php?f=7&t=10981&hilit=FileOpenDialog
- Function FileSaveDialog (Byref sTitle As String, Byref sDir As String = CurDir, sFilter As String = !"All Files (*.*)" + Chr(0) + "*.*" + Chr(0, 0)) As String
- Dim oFilename As OPENFILENAME
- Dim sFilename As Zstring * (MAX_PATH + 1)
- Dim Title As Zstring * 32 => sTitle
- Dim sInitialDir As Zstring * 256 => sDir
- With oFilename
- .lStructSize = SizeOf(OPENFILENAME)
- .hwndOwner = NULL
- .hInstance = GetModuleHandle(NULL)
- .lpstrFilter = Strptr(sFilter)
- .lpstrCustomFilter = NULL
- .nMaxCustFilter = 0
- .nFilterIndex = 1
- .lpstrFile = @sFilename
- .nMaxFile = SizeOf(sFilename)
- .lpstrFileTitle = NULL
- .nMaxFileTitle = 0
- .lpstrInitialDir = @sInitialDir
- .lpstrTitle = @Title
- .Flags = OFN_EXPLORER Or OFN_FILEMUSTEXIST Or OFN_PATHMUSTEXIST
- .nFileOffset = 0
- .nFileExtension = 0
- .lpstrDefExt = NULL
- .lCustData = 0
- .lpfnHook = NULL
- .lpTemplateName = NULL
- End With
- If GetSaveFileName(@oFilename) = False Then Return ""
- Return sFilename
- End Function
- Function DecompressImage(sLabel as string) As Any Ptr
- 'decompress base91 encoded image
- Dim As Ulong iLines, bCompressed, iFileSize, iCompressedSize
- Dim As String sBaseType, sBase91, aB91(1)
- select Case sLabel
- Case "__fblogopng"
- Restore __fblogopng:
- Case "__bubblebazina7_24x24png"
- Restore __bubblebazina7_24x24png:
- Case "__compresspng"
- Restore __compresspng:
- Case "__outputpng"
- Restore __outputpng:
- Case "__aboutpng"
- Restore __aboutpng:
- Case "__exitpng"
- Restore __exitpng:
- Case "__resetpng:"
- Restore __resetpng:
- Case "__fbicnpng"
- Restore __fbicnpng:
- End Select
- Read iLines
- Read bCompressed
- Read iFileSize
- Read iCompressedSize
- Read sBaseType
- For i As Ushort = 0 To iLines - 1
- Read aB91(0)
- sBase91 &= aB91(0)
- Next
- Dim As Ulong iLenB91
- Static As Ubyte Ptr aBinary
- aBinary = Base91Decode(sBase91, iLenB91)
- Dim As Any Ptr hBitmapGDI = _GDIPlus_BitmapCreateFromMemory3(aBinary, iLenB91, True)
- aBinary = 0
- Return hBitmapGDI
- end function
- Function DecompressHorseAnim() As any Ptr
- Dim As Ulong iLines, bCompressed, iFileSize, iCompressedSize
- Dim As String sBaseType, sBase91, aB91(1)
- Restore __horseani:
- Read iLines
- Read bCompressed
- Read iFileSize
- Read iCompressedSize
- Read sBaseType
- For i As Ushort = 0 To iLines - 1
- Read aB91(0)
- sBase91 &= aB91(0)
- Next
- Dim As Ulong l
- Dim As Ubyte Ptr aBinary = Base91Decode(sBase91, l)
- Dim As Boolean bError = False
- If bCompressed Then
- If iCompressedSize <> l Then bError = TRUE
- Else
- If iFileSize <> l Then bError = TRUE
- Endif
- If bError <> False Then
- ? "Something went wrong"
- Sleep
- End
- End If
- Dim As HICON hAnim
- If bCompressed Then
- Dim as Ubyte Ptr aBinaryC = _WinAPI_RtlDecompress(aBinary, iFileSize, iCompressedSize)
- hAnim = CreateIconFromResourceEx(aBinaryC, iFileSize, True, &h30000, 0, 0, LR_DEFAULTCOLOR)
- Deallocate(aBinaryC)
- Else
- hAnim = CreateIconFromResourceEx(aBinary, iFileSize, True, &h30000, 0, 0, LR_DEFAULTCOLOR)
- aBinary = 0
- Endif
- Return hAnim
- End Function
- Sub DecompressSID()
- 'decompress base91 encoded image
- Dim As Ulong iLines, bCompressed, iFileSize, iCompressedSize
- Dim As String sBaseType, sBase91, aB91(1)
- Restore __sid:
- Read iLines
- Read iCompression
- Read iFileSize
- Read iCompressedSize
- Read sBaseType
- For i As Ushort = 0 To iLines - 1
- Read aB91(0)
- sBase91 &= aB91(0)
- Next
- Dim As Ulong iLenB91
- Static As Ubyte Ptr aBinary
- aBinary = Base91Decode(sBase91, iLenB91)
- Dim As Integer hFile
- hFile = Freefile()
- Open "Unicornflakes.sid" For Binary Access Write As #hFile
- If iCompression Then
- Dim as Ubyte Ptr aBinaryC = _WinAPI_RtlDecompress(aBinary, iFileSize, iCompressedSize, iCompression)
- Put #hFile, 0, aBinaryC[0], iFileSize
- Deallocate(aBinaryC)
- Else
- Put #hFile, 0, aBinary[0], iFileSize
- Endif
- Close #hFile
- aBinary = 0
- End Sub
- Function _GDIPlus_BitmapCreateFromMemory3(aBinImage As Ubyte Ptr, iLen As Ulong, bBitmap_GDI As Bool = False) As Any Ptr
- Dim As HGLOBAL hGlobal
- Dim As LPSTREAM hStream
- Dim As Any Ptr hImage_Stream
- Dim As Any Ptr hMemory = GlobalAlloc(GMEM_MOVEABLE, iLen)
- Dim As Any Ptr lpMemory = GlobalLock(hMemory)
- RtlCopyMemory(lpMemory, @aBinImage[0], iLen)
- GlobalUnlock(hMemory)
- CreateStreamOnHGlobal(hMemory, 0, @hStream)
- GdipCreateBitmapFromStream(hStream, @hImage_Stream)
- IUnknown_Release(hStream)
- If bBitmap_GDI = TRUE Then
- Dim hImage_GDI As Any Ptr
- GdipCreateHBITMAPFromBitmap(hImage_Stream, @hImage_GDI, &hFF000000)
- GdipDisposeImage(hImage_Stream)
- Return hImage_GDI
- Endif
- Return hImage_Stream
- End Function
- Function Base91Encode(binArray As Ubyte Ptr, iLen as Ulong, ByRef iLenOut as Ulong) As String
- Dim sChars As String
- sChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~´" '´ instead of "
- Dim aB91(0 To 91) As String ' This is 92 elements
- Dim As ULong i
- For i = 0 To UBound(aB91) - 1
- aB91(i) = Mid(sChars, i + 1, 1) 'split sChar to an array
- Next
- Dim As String sEncoded
- Dim As Long n
- Dim as ULong b, v
- b = 0
- n = 0
- For i = 0 To iLen - 1 'encode input to Base91
- b = b Or (binArray[i] Shl n)
- n += 8
- If n > 13 Then
- v = b And 8191
- If v > 88 Then
- b = b Shr 13
- n -= 13
- Else
- v = b and 16383
- b = b Shr 14
- n -= 14
- EndIf
- sEncoded &= aB91(v Mod 91) & aB91(v \ 91)
- EndIf
- Next
- If n Then
- sEncoded &= aB91(b Mod 91)
- If (n > 7) Or (b > 90) Then sEncoded &= aB91(b \ 91)
- EndIf
- iLenOut = Len(sEncoded) 'return lentgh of the string
- Return sEncoded
- End Function
- Function Base91Decode(sString As String, Byref iBase91Len As Ulong) As Ubyte Ptr
- Dim As String sB91, sDecoded
- sB91 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~´" '´ instead of "
- Dim As Long i, n = 0, c, b = 0, v = -1
- Dim aChr(0 To Len(sString) - 1) As String
- For i = 0 To Ubound(aChr)
- aChr(i) = Mid(sString, i + 1, 1)
- Next
- For i = 0 To Ubound(aChr)
- c = Instr(sB91, aChr(i)) - 1
- If v < 0 Then
- v = c
- Else
- v += c * 91
- b = b Or (v Shl n)
- n += 13 + (((v And 8191) <= 88) * -1)
- Do Until (n > 7)=0
- sDecoded &= Chr(b And 255)
- b = b Shr 8
- n -= 8
- Loop
- v = -1
- Endif
- Next
- If (v + 1) Then
- sDecoded &= Chr((b Or (v Shl n)) And 255)
- End If
- iBase91Len = Len(sDecoded)
- 'workaround For multiple embedded file other crash will occure
- Static As Ubyte aReturn(0 To iBase91Len - 1)
- Redim aReturn(0 To iBase91Len - 1) As Ubyte
- For i = 0 To iBase91Len - 1 'convert result String To ascii code values
- aReturn(i) = Asc(sDecoded, i + 1)
- Next
- Return @aReturn(0) 'Return Pointer To the array
- End Function
- Function Base128Encode(binArray As Ubyte Ptr, iLen as ulong, ByRef iLenOut as Ulong) As String
- Dim As String sEncoded, sB128 = "!#$%()*,.0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎ"
- Dim aB128(0 To 127) As String
- Dim As Long i
- For i = 0 To Ubound(aB128)
- aB128(i) = Mid(sB128, i + 1, 1) 'split sChar to an array
- Next
- Dim aASCII(0 To iLen) As ULong
- For i = 0 To Ubound(aASCII) - 1
- aASCII(i) = binArray[i] 'split input to an ASCII array
- Next
- aASCII(Ubound(aASCII)) = Asc(" ")
- Dim As Long ls = 0, r = 0, rs = 7, nc
- For i = 0 To Ubound(aASCII)
- If ls > 7 Then
- i -= 1
- ls = 0
- rs = 7
- EndIf
- nc = ((aASCII(i) Shl ls) And &h7F) Or r
- r = (aASCII(i) Shr rs) And &h7F
- rs -= 1
- ls += 1
- sEncoded &= aB128(nc)
- Next
- iLenOut = Len(sEncoded) 'return lentgh of the string
- Return sEncoded
- End Function
- 'https://docs.microsoft.com/en-us/windows/desktop/api/wincrypt/nf-wincrypt-cryptbinarytostringa
- 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
- Dim As Any Ptr hLib = Dylibload("Crypt32.dll")
- Dim pCryptBinaryToString As Function _
- (Byval pbBinary As Ubyte Ptr, _
- Byval cbBinary As Ulong, _
- Byval dwFlags As Ulong, _
- Byval pszString As Byte Ptr, _
- Byval pcchString As Ulong Ptr) As Boolean
- pCryptBinaryToString = Dylibsymbol(hLib, "CryptBinaryToStringA")
- Dim As Ulong iLenB64 = 0
- Dim As Boolean result = pCryptBinaryToString(binArray, _
- iLen, _
- iFLags, _
- 0, _
- @iLenB64)
- iB64Len = iLenB64
- If iLenB64 = 0 Then Return ""
- Dim As Ubyte Ptr pB64 = Allocate(iLenB64)
- result = pCryptBinaryToString(binArray, _
- iLen, _
- iFLags, _
- pB64, _
- @iLenB64)
- Dylibfree(hLib)
- Dim As String sEncoded
- For i As Ulong = 0 To iLenB64 - 1
- sEncoded &= Chr(pB64[i])
- Next
- Deallocate(pB64)
- Return sEncoded
- End Function
- 'by marpon
- Private Function lzfx_compress(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong , Byval obuf As Ubyte Ptr , Byref olen As Ulong) As Long
- /' Hash table an array of Ubyte*'s which Point
- To various locations in the Input buffer '/
- Dim As Ubyte Ptr htab_arr(LZFX_HSIZE)
- Dim As Ubyte Ptr Ptr htab = @htab_arr(Lbound(htab_arr))
- Dim As Ubyte Ptr Ptr hslot /' Pointer To entry in hash table '/
- Dim As Ulong hval /' Hash value generated by macros above '/
- Dim As Ubyte Ptr ref /' Pointer To candidate match location in Input '/
- Dim As Ubyte Ptr ip = ibuf
- Dim As Ubyte Ptr in_end = ip + ilen
- Dim As Ubyte Ptr op = obuf
- Dim As Ubyte Ptr out_end = op + olen '(olen = NULL ? NULL : op + *olen)
- Dim As Long lit /' # of bytes in current literal Run '/
- Dim As Ulongint off1
- If (ibuf = NULL Or ilen = 0) Then
- olen = 0
- Return LZFX_EARGS
- End If
- If (obuf = NULL) Then
- olen = ilen * 1.1 + 80 / ilen /' consersative buffer Len '/
- Return 0
- End If
- /' Start a literal Run. Whenever we Do This the Output Pointer Is
- advanced because the current Byte will hold the encoded length. '/
- lit = 0 : op += 1
- hval = LZFX_FRST(ip)
- While(ip + 2 < in_end) /' The Next macro reads 2 bytes ahead '/
- hval = LZFX_NEXT(hval , ip)
- hslot = htab + LZFX_IDX(hval)
- ref = *hslot : *hslot = ip
- If ref < ip Then off1 = ip - ref - 1
- If ((ref < ip) Andalso (off1 < LZFX_MAX_OFF) Andalso ( ip + 4 < in_end) _
- Andalso (ref > ibuf ) Andalso (ref[0] = ip[0]) Andalso (ref[1] = ip[1]) _
- Andalso (ref[2] = ip[2])) Then
- Dim As Ulong len1 = 3 /' We already know 3 bytes match '/
- Dim As Ulong maxlen = LZFX_MAX_REF
- If in_end - ip - 2 < LZFX_MAX_REF Then maxlen = in_end - ip - 2
- /' lit = 0: op + 3 must be < out_end (because we undo the Run)
- lit <> 0: op + 3 + 1 must be < out_end '/
- If op - MY_NOT(lit) + 4 >= out_end Then Return LZFX_ESIZE
- op [- lit - 1] = lit - 1 /' Terminate literal Run '/
- op -= MY_NOT(lit) /' Undo Run If length Is zero '/
- /' Start checking at the fourth Byte '/
- While((len1 < maxlen) And (ref[len1] = ip[len1]))
- len1 += 1
- Wend
- len1 -= 2 /' We encode the length As #octets - 2 '/
- /' Format 1: [LLLooooo oooooooo] '/
- If (len1 < 7) Then
- *op = (off1 Shr 8) + (len1 Shl 5)
- op += 1
- *op = off1
- op += 1
- /' Format 2: [111ooooo LLLLLLLL oooooooo] '/
- Else
- *op = (off1 Shr 8) + (7 Shl 5)
- op += 1
- *op = len1 - 7
- op += 1
- *op = off1
- op += 1
- End If
- lit = 0 : op += 1
- ip += (len1 + 1) /' ip = initial ip + #octets -1 '/
- If (ip + 3 >= in_end) Then
- ip+=1 /' Code following expects Exit at bottom of Loop '/
- Exit While 'break
- End If
- hval = LZFX_FRST(ip)
- hval = LZFX_NEXT(hval , ip)
- htab[LZFX_IDX(hval)] = ip
- ip+=1 /' ip = initial ip + #octets '/
- Else
- /' Keep copying literal bytes '/
- If (op >= out_end) Then Return LZFX_ESIZE
- lit += 1 : *op = *ip : op += 1 : ip += 1
- If (lit = LZFX_MAX_LIT) Then
- op [- lit - 1] = lit - 1 /' Stop Run '/
- lit = 0 : op+=1 /' start Run '/
- End If
- End If /' If() found match in htab '/
- Wend /' While(ip < ilen -2) '/
- /' At most 3 bytes remain in Input. We therefore need 4 bytes available
- in the Output buffer To store them (3 Data + ctrl Byte).'/
- If (op + 3 > out_end) Then Return LZFX_ESIZE
- While(ip < in_end)
- lit += 1 : * op = *ip : op += 1 : ip += 1
- If (lit = LZFX_MAX_LIT) Then
- op[- lit - 1] = lit - 1
- lit = 0 : op += 1
- End If
- Wend
- op[- lit - 1] = lit - 1
- op -= MY_NOT( lit)
- olen = op - obuf
- Return 0
- End Function
- Private Function size_comp_buffer(Byval ibuf As Ubyte Ptr , Byval ilen As Ulong ) As Long
- If ibuf = NULL Or ilen = 0 Then Return LZFX_EARGS
- Return ilen * 1.1 + 80 / ilen /' consersative buffer Len '/
- End Function
- Private Sub init_bits(Byval inbuf As Ubyte Ptr, Byval outbuf As Ubyte Ptr, Byval tinfo As info_t Ptr)
- tinfo->g_bit_count = 0
- tinfo->g_bit_buf = 0
- tinfo->g_inbuf_pos = 0
- tinfo->g_outbuf_pos = 0
- tinfo->g_inbuf = inbuf
- tinfo->g_outbuf = outbuf
- End Sub
- Private Sub put_bits(Byval n As Long, Byval x As Long, Byval tinfo As info_t Ptr)
- tinfo->g_bit_buf Or= x Shl tinfo->g_bit_count
- tinfo->g_bit_count += n
- While tinfo->g_bit_count >= 8
- tinfo->g_outbuf[tinfo->g_outbuf_pos] = tinfo->g_bit_buf
- tinfo->g_outbuf_pos += 1
- tinfo->g_bit_buf Shr= 8
- tinfo->g_bit_count -= 8
- Wend
- End Sub
- Private Sub flush_bits(Byval tinfo As info_t Ptr)
- put_bits(7, 0, tinfo)
- tinfo->g_bit_count = 0
- tinfo->g_bit_buf = 0
- End Sub
- Private Function get_bits(Byval n As Long, Byval tinfo As info_t Ptr) As Long
- While tinfo->g_bit_count < n
- tinfo->g_bit_buf Or= tinfo->g_inbuf[tinfo->g_inbuf_pos] Shl tinfo->g_bit_count
- tinfo->g_inbuf_pos += 1
- tinfo->g_bit_count += 8
- Wend
- Dim x As Long = tinfo->g_bit_buf And ((1 Shl n) - 1)
- tinfo->g_bit_buf Shr= n
- tinfo->g_bit_count -= n
- Return x
- End Function
- Private Function get_min(Byval a As Long, Byval b As Long) As Long
- Return Iif(a < b, a, b)
- End Function
- Private Function get_max(Byval a As Long, Byval b As Long) As Long
- Return Iif(a > b, a, b)
- End Function
- Private Function get_penalty(Byval a As Long, Byval b As Long) As Long
- Dim p As Long = 0
- While a > b
- a Shr= 3
- p += 1
- Wend
- Return p
- End Function
- 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
- If buf = NULL Or buf_size < 1 Then
- 'fprintf(stderr, !"Source buffer corrupted: size=%d\n", buf_size)
- Return -1
- End If
- If outbuf0 = NULL Or out_size < 5 Then
- 'fprintf(stderr, !"Compression buffer corrupted: size=%d\n", out_size)
- Return -2
- End If
- Dim outbuf As Ubyte Ptr = outbuf0 + 4
- Dim tinfo As info_t
- init_bits(NULL, outbuf, @tinfo)
- If level < 0 Or level > 2 Then level = 0
- Redim head(0 To (HASH1_SIZE_DEF + HASH2_SIZE_DEF ) - 1) As Long
- Redim prev(0 To W_SIZE_DEF - 1) As Long
- Dim max_chain(0 To ...) As Long = {4, 256, 1 Shl 12}
- Dim h1 As Long = 0
- Dim h2 As Long = 0
- Dim i As Long = 0
- While i < (HASH1_SIZE_DEF + HASH2_SIZE_DEF)
- head(i) = -1
- i += 1
- Wend
- i = 0
- While i < HASH1_LEN_DEF
- h1 = update_hash1(h1, buf[i])
- i += 1
- Wend
- i = 0
- While i < HASH2_LEN_DEF
- h2 = update_hash2(h2, buf[i])
- i += 1
- Wend
- Dim p As Long = 0
- While p < buf_size
- Dim len0 As Long = MIN_MATCH_DEF - 1
- Dim offset0 As Long = W_SIZE_DEF
- Dim max_match As Long = get_min(MAX_MATCH_DEF, buf_size - p)
- Dim limit As Long = get_max(p - W_SIZE_DEF, 0)
- If head(h1) >= limit Then
- Dim s As Long = head(h1)
- If buf[s] = buf[p] Then
- Dim l As Long = 1
- While l < max_match
- If buf[(s + l)] <> buf[(p + l)] Then
- Exit While
- End If
- l += 1
- Wend
- If l > len0 Then
- len0 = l
- offset0 = p - s
- End If
- End If
- End If
- If len0 < MAX_MATCH_DEF Then
- Dim chain_len As Long = max_chain(level)
- Dim s As Long = head((h2 + HASH1_SIZE_DEF))
- While (chain_len <> 0) Andalso (s >= limit)
- If (buf[(s + len0)] = buf[(p + len0)]) Andalso (buf[s] = buf[p]) Then
- Dim l As Long = 1
- While l < max_match
- If buf[(s + l)] <> buf[(p + l)] Then
- Exit While
- End If
- l += 1
- Wend
- Dim As Long itemp0 = get_penalty((p - s) Shr 4, offset0)
- If l > (len0 + itemp0) Then
- len0 = l
- offset0 = p - s
- End If
- If l = max_match Then
- Exit While
- End If
- End If
- s = prev((s And W_MASK_DEF))
- chain_len -= 1
- Wend
- End If
- If (len0 = MIN_MATCH_DEF) Andalso (offset0 > TOO_FAR_DEF) Then
- len0 = 0
- End If
- If ((level >= 2) Andalso (len0 >= MIN_MATCH_DEF)) Andalso (len0 < max_match) Then
- Dim next_p As Long = p + 1
- Dim max_lazy As Long = get_min(len0 + 4, max_match)
- Dim chain_len As Long = max_chain(level)
- Dim s As Long = head((update_hash2(h2, buf[(next_p + (HASH2_LEN_DEF - 1))]) + HASH1_SIZE_DEF))
- While (chain_len <> 0) Andalso (s >= limit)
- If (buf[(s + len0)] = buf[(next_p + len0)]) Andalso (buf[s] = buf[next_p]) Then
- Dim l As Long = 1
- While l < max_lazy
- If buf[(s + l)] <> buf[(next_p + l)] Then
- Exit While
- End If
- l += 1
- Wend
- If l > (len0 + get_penalty(next_p - s, offset0)) Then
- len0 = 0
- Exit While
- End If
- If l = max_lazy Then
- Exit While
- End If
- End If
- s = prev((s And W_MASK_DEF))
- chain_len -= 1
- Wend
- End If
- If len0 >= MIN_MATCH_DEF Then
- put_bits(1, 1, @tinfo)
- Dim l As Long = len0 - MIN_MATCH_DEF
- If l < A_DEF Then
- put_bits(1, 1, @tinfo)
- put_bits(A_BITS_DEF, l, @tinfo)
- Elseif l < B_DEF Then
- put_bits(2, 1 Shl 1, @tinfo)
- put_bits(B_BITS_DEF, l - A_DEF, @tinfo)
- Elseif l < C_DEF Then
- put_bits(3, 1 Shl 2, @tinfo)
- put_bits(C_BITS_DEF, l - B_DEF, @tinfo)
- Elseif l < D_DEF Then
- put_bits(4, 1 Shl 3, @tinfo)
- put_bits(D_BITS_DEF, l - C_DEF, @tinfo)
- Elseif l < E_DEF Then
- put_bits(5, 1 Shl 4, @tinfo)
- put_bits(E_BITS_DEF, l - D_DEF, @tinfo)
- Else
- put_bits(5, 0, @tinfo)
- put_bits(F_BITS_DEF, l - E_DEF, @tinfo)
- End If
- offset0 -= 1
- Dim log0 As Long = W_BITS_DEF - NUM_SLOTS_DEF
- While offset0 >= (2 Shl log0)
- log0 += 1
- Wend
- put_bits(SLOT_BITS_DEF, log0 - (W_BITS_DEF - NUM_SLOTS_DEF), @tinfo)
- If log0 > (W_BITS_DEF - NUM_SLOTS_DEF) Then
- put_bits(log0, offset0 - (1 Shl log0), @tinfo)
- Else
- put_bits(W_BITS_DEF - (NUM_SLOTS_DEF - 1), offset0, @tinfo)
- End If
- Else
- len0 = 1
- put_bits(9, buf[p] Shl 1, @tinfo)
- End If
- While len0 <> 0
- len0 -= 1
- head(h1) = p
- prev((p And W_MASK_DEF)) = head((h2 + HASH1_SIZE_DEF))
- head((h2 + HASH1_SIZE_DEF)) = p
- p += 1
- h1 = update_hash1(h1, buf[(p + (HASH1_LEN_DEF - 1))])
- h2 = update_hash2(h2, buf[(p + (HASH2_LEN_DEF - 1))])
- Wend
- Wend
- flush_bits(@tinfo)
- memcpy(outbuf0, @buf_size, 4)
- Return tinfo.g_outbuf_pos + 4
- End Function
- Private Function lzmat_check(Byval inbuf As Ubyte Ptr)As Long
- If inbuf = NULL Then
- 'fprintf(stderr, !"Compressed buffer corrupted!\n")
- Return -1
- End If
- Return *Cptr(Ulong Ptr, inbuf)
- End Function
- Private Function lzmat_compressBound(Byval insize As Long)As Long
- If insize = 0 Then
- Return 0
- Elseif insize < 50 Then
- Return insize * 2 + 16
- Elseif insize < 100 Then
- Return insize * 1.4 + 8
- Elseif insize < 1000 Then
- Return insize * 1.3
- Elseif insize < 10000 Then
- Return insize * 1.25
- End If
- Return insize * 1.2 + 32
- End Function
- 'Generated by FB File2Bas Code Generator v0.80 build 2019-01-05 beta by UEZ
- __horseani:
- Data 7,1,18722,5607,"Base91"
- Data "86Gtzzbj5xkAAAV/(3V*[51cw(IAAAi@h5ot&+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