UEZ

File to Base64 String Code Generator v1.20 Build 2015-01-20 (embed your files easily)

123 posts in this topic




Very similar to this script:

I make use of Base64 encoding features, the compression is much better!

João Carlos.

1 person likes this

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites

I wanted to try your example but when mouse is over bottom button, merlin disapears...

1 person likes this

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Very similar to this script:

I make use of Base64 encoding features, the compression is much better!

João Carlos.

Indeed, very similar script. Well, I implemented also a Base64 version but the compression wasn't better. Have a look here: Base64 version

Either I missed something or it is as it is.

I wanted to try your example but when mouse is over bottom button, merlin disapears...

This appears with Windows XP only. Just move these 2 lines

_WinAPI_DeleteObject($Bmp_Logo)
_WinAPI_DeleteObject($Bmp_Button)

to

Case $GUI_EVENT_CLOSE
            _WinAPI_DeleteObject($Bmp_Logo)
            _WinAPI_DeleteObject($Bmp_Button)
            GUIDelete($hGUI)
            Exit

and should work. Btw, the button looks awful on WinXP :D

Thanks for your feedback!

Br,

UEZ

Edited by UEZ
1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

@UEZ

I have a sample image with 296 KB when converted with your script the size is 573 KB and with my script is 397 KB!

João Carlos.

1 person likes this

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites

Changed the code from binary string to base64 string to save some more bytes :D

Br,

UEZ

1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Your first version worked fine, this one crashes on my Win7-64bit while converting.

Strange, because I'm using Win7 x64 in general, too! Which file your are converting and on which stage it is crashing (while compression or base64 converting)? What is the error code?

Br,

UEZ

Edited by UEZ
1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

It crashes in the _Base64Encode() function. I've got DEP activated, and I guess you're missing a _MemVirtualAlloc() for the codebuffer there.

Edit: Btw, this one came exactly at the right time and the "File to Hex Binary Converter" version went right into :D, thanks a lot! I'll switch to the Base64 on the next release.

Edit #2:

Add #include <Memory.au3> at the top and change the _Base64Encode() function to this :oops:...

Func _Base64Encode($Data, $LineBreak = 0)
    Local $Opcode = "0x5589E5FF7514535657E8410000004142434445464748494A4B4C4D4E4F505152" _
                                  & "535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778" _
                                  & "797A303132333435363738392B2F005A8B5D088B7D108B4D0CE98F0000000FB6" _
                                  & "33C1EE0201D68A06880731C083F901760C0FB6430125F0000000C1E8040FB633" _
                                  & "83E603C1E60409C601D68A0688470183F90176210FB6430225C0000000C1E806" _
                                  & "0FB6730183E60FC1E60209C601D68A06884702EB04C647023D83F90276100FB6" _
                                  & "730283E63F01D68A06884703EB04C647033D8D5B038D7F0483E903836DFC0475" _
                                  & "0C8B45148945FC66B80D0A66AB85C90F8F69FFFFFFC607005F5E5BC9C21000"
    Local $pProc = _MemVirtualAlloc(0, BinaryLen($Opcode), $MEM_COMMIT, $PAGE_EXECUTE_READWRITE)
    Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($Opcode) & "]",$pProc)
    DllStructSetData($CodeBuffer, 1, $Opcode)
    $Data = Binary($Data)
    Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]")
    DllStructSetData($Input, 1, $Data)
    $LineBreak = Floor($LineBreak / 4) * 4
    Local $OputputSize = Ceiling(BinaryLen($Data) * 4 / 3)
    $OputputSize = $OputputSize + Ceiling($OputputSize / $LineBreak) * 2 + 4
    Local $Ouput = DllStructCreate("char[" & $OputputSize & "]")
    DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), "ptr", DllStructGetPtr($Input), "int", BinaryLen($Data), "ptr", DllStructGetPtr($Ouput), "uint", $LineBreak)
    _MemVirtualFree($pProc, BinaryLen($Opcode), $MEM_DECOMMIT)
    Return DllStructGetData($Ouput, 1)
EndFunc   ;==>_Base64Encode
Edited by KaFu
1 person likes this

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Fixed some bugs (no base64 conversation on small files and checkbox logic issues) and added DEP check to add program to the exclusion list to avoid hard crash.

Edit: I will add the modified _Base64Encode() function by KaFu in the next release!

Br,

UEZ

Edited by UEZ
1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#12 ·  Posted

Grrr, sorry, found another bug when compression is unselected! Last 2 lines of the function have been forgotten! :D

Br,

UEZ :oops:

1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#13 ·  Posted

Updated to v0.94 Build 2011-11-01 Beta.

Br,

UEZ

1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#14 ·  Posted

Updated to v0.99 -> added multi file support.

Br,

UEZ

1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

@jscript: your are welcome.

Updated to v1.00 final and changed name to File to Base64 String Code Generator.

If you find bugs or have any suggestions please let me know!

Br,

UEZ

Edited by UEZ
1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#17 ·  Posted

Very nice script!

Would suggest to check if compression reduced size, if not continue with uncompressed data.

1 person likes this

Share this post


Link to post
Share on other sites

#18 ·  Posted

Very nice script!

Would suggest to check if compression reduced size, if not continue with uncompressed data.

Thanks for you suggestion - makes sense!

Next release will check whether compression increases the size and skip to uncompressed binary automatically!

Br,

UEZ

1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#19 ·  Posted

UEZ, you are giving me credit for base64 code but that code is not mine as far as I know. The only base64 code I have ever used in that form is Ward's and it's inside AutoItObject.au3, working in both x86 and x64 versions of interpreter.

I have written base64 UDF code using Windows API for, but not this.

1 person likes this

 

.

eMyvnE

Share this post


Link to post
Share on other sites

#20 ·  Posted

You're right, seems to be Wards code and I would recommend to switch to Wards code as these functions support x64 as well :D (+ this is already DEP save).

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • wakillon
      Bitmap2Svg
      By wakillon
      Do not expect a SVG file as Sodipodi, Inkscape or Adobe Illustrator can generate.
      This "converter" doesn't actually trace or convert the image to vector. 
      It just embed the bitmap image within an SVG container.
      #Region ;************ Includes ************ #Include <GDIPlus.au3> #Include <Memory.au3> #EndRegion ;************ Includes ************ Global $_B64E_CodeBuffer, $_B64E_CodeBufferMemory, $_B64E_Init, $_B64E_EncodeData, $_B64E_EncodeEnd Global $sFile, $hImage, $iW, $iH, $sType, $hFile, $sBase64String, $sFileRead, $sSvgPath, $sString _GDIPlus_Startup() $sFile = FileOpenDialog ( 'Select an Image', @DesktopDir, 'Images (*.jpg;*.png;*.gif;*.bmp)', 1+2 ) If @error Then Exit $sType = _FileGetType ( $sFile ) If @error Then ConsoleWrite ( '! File Type not supported, error : ' & @error & @Crlf ) Else $hFile = FileOpen ( $sFile, 16 ) If $hFile=-1 Then Exit MsgBox ( 262144+4096+16, 'Error', 'Can not Access this file.', 4 ) $hImage = _GDIPlus_ImageLoadFromFile ( $sFile ) $iW = _GDIPlus_ImageGetWidth ( $hImage ) $iH = _GDIPlus_ImageGetHeight ( $hImage ) _GDIPlus_ImageDispose ( $hImage ) $sFileRead = FileRead ( $hFile ) FileClose ( $hFile ) $sBase64String = _Base64Encode ( $sFileRead, 4000 ) $sString = '<svg' & @CRLF & _ ' version="1.1"' & @CRLF & _ ' xmlns="http://www.w3.org/2000/svg"' & @CRLF & _ ' xmlns:xlink="http://www.w3.org/1999/xlink"' & @CRLF & _ ' width="' & $iW & 'px" height="' & $iH & 'px"' & @CRLF & _ ' viewBox="0 0 ' & $iW & ' ' & $iH & '" preserveAspectRatio="none">' & @CRLF & _ ' <g>' & @CRLF & _ '<image width="' & $iW & '" height="' & $iH & '" xlink:href="data:image/' & $sType & ';base64,' & @CRLF & _ $sBase64String & @CRLF & _ '"/>' & @CRLF & _ ' </g>' & @CRLF & _ '</svg>' & @CRLF $sSvgPath = @TempDir & '\' & @HOUR & @MIN & @SEC & @MSEC & '-' & $iW & 'x' & $iH & '.svg' $hFile = FileOpen ( $sSvgPath, 1+2+8 ) If $hFile = -1 Then MsgBox ( 262144+4096+16, '', 'An error occurred whilst writing the temporary file.' ) Else FileWrite ( $hFile, $sString ) FileClose ( $hFile ) ShellExecute ( 'iexplore.exe', $sSvgPath ) EndIf EndIf _GDIPlus_Shutdown() Exit Func _FileGetType ( $sFilePath ) If Not FileExists ( $sFilePath ) Then Return SetError ( -1 ) If FileGetSize ( $sFilePath ) = 0 Then Return SetError ( 1, 0, 0 ) Local $hFile, $Binary, $Ret $hFile = FileOpen ( $sFilePath, 16 ) If $hFile = -1 Then Return SetError ( 3, 0, 0 ) $Binary = FileRead ( $hFile ) FileClose ( $hFile ) Local $sString = StringTrimLeft ( $Binary, 2 ) Local $sStringLeft = StringReplace ( StringTrimLeft ( StringLeft ( $Binary, 14 ), 2 ), '00', '' ) Local $sStringLeft12 = StringLeft ( $sStringLeft, 12 ) Local $sStringLeft8 = StringLeft ( $sStringLeft, 8 ) Local $sStringLeft4 = StringLeft ( $sStringLeft, 4 ) Select Case $sStringLeft12 = '474946383961' Or $sStringLeft12 = '474946383761' $Ret = 'GIF' Case $sStringLeft4 = 'FFD8' $Ret = 'JPG' Case $sStringLeft4 = '424D' $Ret = 'BMP' Case $sStringLeft8 = '89504E47' $Ret = 'PNG' Case Else Return SetError ( 2, 0, '' ) EndSelect If $Ret = 'GIF' Then StringReplace ( $sString, '0021F904', '0021F904' ) If @extended > 1 Then Return SetError ( 3, 0, '' ) ; animated gif. EndIf Return $Ret EndFunc ;==> _FileGetType() Func _Base64E_Exit() ; by Ward $_B64E_CodeBuffer = 0 _MemVirtualFree ( $_B64E_CodeBufferMemory, 0, $MEM_RELEASE ) EndFunc ;==> _Base64E_Exit() Func _Base64Encode ( $Data, $LineBreak=76 ) ; by Ward Local $State = _Base64EncodeInit ( $LineBreak ) Return _Base64EncodeData ( $State, $Data ) & _Base64EncodeEnd ( $State ) EndFunc ;==> _Base64Encode() Func _Base64EncodeData ( ByRef $State, $Data ) ; by Ward If Not IsDllStruct ( $_B64E_CodeBuffer ) Or Not IsDllStruct ( $State ) Then Return SetError ( 1, 0, '' ) $Data = Binary ( $Data ) Local $InputLen = BinaryLen ( $Data ) Local $Input = DllStructCreate ( 'byte[' & $InputLen & ']' ) DllStructSetData ( $Input, 1, $Data ) Local $OputputLen = Ceiling ( BinaryLen ( $Data )*1.4 )+3 Local $Output = DllStructCreate ( 'char[' & $OputputLen & ']' ) DllCall ( 'user32.dll', 'int', 'CallWindowProc', 'ptr', DllStructGetPtr ( $_B64E_CodeBuffer )+$_B64E_EncodeData, 'ptr', DllStructGetPtr ( $Input ), 'uint', $InputLen, 'ptr', DllStructGetPtr ( $Output ), 'ptr', DllStructGetPtr ( $State ) ) Return DllStructGetData ( $Output, 1 ) EndFunc ;==> _Base64EncodeData() Func _Base64EncodeEnd ( ByRef $State ) ; by Ward If Not IsDllStruct ( $_B64E_CodeBuffer ) Or Not IsDllStruct ( $State ) Then Return SetError ( 1, 0, '' ) Local $Output = DllStructCreate ( 'char[5]' ) DllCall ( 'user32.dll', 'int', 'CallWindowProc', 'ptr', DllStructGetPtr ( $_B64E_CodeBuffer ) + $_B64E_EncodeEnd, 'ptr', DllStructGetPtr ( $Output ), 'ptr', DllStructGetPtr ( $State ), 'int', 0, 'int', 0 ) Return DllStructGetData ( $Output, 1 ) EndFunc ;==> _Base64EncodeEnd() Func _Base64EncodeInit ( $LineBreak=76 ) ; by Ward If Not IsDllStruct ( $_B64E_CodeBuffer ) Then If @AutoItX64 Then Local $Opcode = '0x89C08D42034883EC0885D2C70100000000C64104000F49C2C7410800000000C1F80283E20389410C740683C00189410C4883C408C389C94883EC3848895C242848897424304889CB8B0A83F901742083F9024889D87444C6000A4883C001488B74243029D8488B5C24284883C438C30FB67204E803020000BA3D0000004080FE3F7F08480FBEF60FB614308813C643013D488D4303C643023DEBBC0FB67204E8D7010000BA3D0000004080FE3F7F08480FBEF60FB614308813C643013D488D4302EB9489DB4883EC68418B014863D248895C242848897424304C89C348897C24384C896424484C89CE83F80148896C24404C896C24504C897424584C897C24604C8D2411410FB6790474434D89C64989CD0F82F700000083F8024C89C5747B31C0488B5C2428488B742430488B7C2438488B6C24404C8B6424484C8B6C24504C8B7424584C8B7C24604883C468C34C89C54989CF4D39E70F840B010000450FBE374D8D6F014489F025F0000000C1F80409C7E8040100004080FF3FBA3D0000007F08480FBEFF0FB614384489F78855004883C50183E70FC1E7024D39E50F84B2000000450FB675004983C5014489F025C0000000C1F80609C7E8BD0000004080FF3FBA3D0000007F08480FBEFF0FB61438BF3F0000008855004421F74C8D7502E896000000480FBED70FB604108845018B460883C0013B460C89460875104C8D7503C645020AC7460800000000904D39E5742E410FBE7D004D8D7D01498D6E01E8560000004889FA83E70348C1EA02C1E70483E23F0FB60410418806E913FFFFFF4489F040887E04C7060000000029D8E9CCFEFFFF89E840887E04C7060200000029D8E9B9FEFFFF89E840887E04C7060100000029D8E9A6FEFFFFE8400000004142434445464748494A4B4C4D4E4F505152535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778797A303132333435363738392B2F58C3' Else Local $Opcode = '0x89C08B4C24088B44240489CAC1FA1FC1EA1E01CAC1FA0283E103C70000000000C6400400C740080000000089500C740683C20189500CC2100089C983EC0C8B4C2414895C24048B5C2410897424088B1183FA01741D83FA0289D87443C6000A83C0018B74240829D88B5C240483C40CC210000FB67104E80C020000BA3D00000089F180F93F7F0989F20FBEF20FB6143088138D4303C643013DC643023DEBBD0FB67104E8DF010000BA3D00000089F180F93F7F0989F20FBEF20FB6143088138D4302C643013DEB9489DB83EC3C895C242C8B5C244C896C24388B542440897424308B6C2444897C24348B030FB6730401D583F801742D8B4C24488954241C0F820101000083F80289CF747D31C08B5C242C8B7424308B7C24348B6C243883C43CC210008B4C244889D739EF0F84400100008D57010FBE3F89542418894C241489F825F0000000C1F80409C6897C241CE8330100008B542418C644240C3D8B4C241489C789F03C3F7F0B0FBEF00FB604378844240C0FB644240C8D790188018B74241C83E60FC1E60239EA0F84CB0000000FB60A83C2018954241C89C825C0000000C1F80609C6884C2414E8D8000000BA3D0000000FB64C24148944240C89F03C3F7F0B0FBEF08B44240C0FB6143083E13F881789CEE8AD00000089F10FBED18D4F020FB604108847018B430883C0013B430C894308750EC647020A8D4F03C7430800000000396C241C743A8B44241C8B7C241C0FBE30894C241483C701E8650000008B4C241489F283E60381E2FC000000C1EA02C1E6040FB60410880183C101E9E4FEFFFF89F088430489C8C703000000002B442448E9B2FEFFFF89F189F8884B04C703020000002B442448E99CFEFFFF89F088430489C8C703010000002B442448E986FEFFFFE8400000004142434445464748494A4B4C4D4E4F505152535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778797A303132333435363738392B2F58C3' EndIf $_B64E_Init = ( StringInStr ( $Opcode, '89C0' )-3 ) / 2 $_B64E_EncodeData = ( StringInStr ( $Opcode, '89DB' )-3 ) / 2 $_B64E_EncodeEnd = ( StringInStr ( $Opcode, '89C9' )-3 ) / 2 $Opcode = Binary ( $Opcode ) $_B64E_CodeBufferMemory = _MemVirtualAlloc ( 0, BinaryLen ( $Opcode ), $MEM_COMMIT, $PAGE_EXECUTE_READWRITE ) $_B64E_CodeBuffer = DllStructCreate ( 'byte[' & BinaryLen ( $Opcode ) & ']', $_B64E_CodeBufferMemory ) DllStructSetData ( $_B64E_CodeBuffer, 1, $Opcode ) OnAutoItExitRegister ( '_Base64E_Exit' ) EndIf Local $State = DllStructCreate ( 'byte[16]' ) DllCall ( 'user32.dll', 'none', 'CallWindowProc', 'ptr', DllStructGetPtr ( $_B64E_CodeBuffer )+$_B64E_Init, 'ptr', DllStructGetPtr ( $State ), 'uint', $LineBreak, 'int', 0, 'int', 0 ) Return $State EndFunc ;==> _Base64EncodeInit() Thanks to Ward for his Base64 functions.
    • TheDcoder
      Help with inserting Null in a Base64 string
      By TheDcoder
      I am really having a headache with this one...
      ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Base64_Encode ; Description ...: Encode the $vData in Base64 ; Syntax ........: _Base64_Encode($vData) ; Parameters ....: $vData - $vData to Encode. ; Return values .: Success: Base64 encoded $vData in the form of a string. ; Failure: False and @error set to: ; 1 - If "error calculating the length of the buffer needed" ; 2 - If "error encoding" ; Author ........: trancexx ; Modified ......: Damon Harris (TheDcoder) ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Base64_Encode($vData) $vData = Binary($vData) Local $tByteStruct = DllStructCreate("byte[" & BinaryLen($vData) & "]") DllStructSetData($tByteStruct, 1, $vData) Local $tIntStruct = DllStructCreate("int") Local $aDllCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($tByteStruct), _ "int", DllStructGetSize($tByteStruct), _ "int", 1, _ "ptr", 0, _ "ptr", DllStructGetPtr($tIntStruct)) If @error Or Not $aDllCall[0] Then Return SetError(1, 0, False) ; error calculating the length of the buffer needed EndIf Local $tCharStruct = DllStructCreate("char[" & DllStructGetData($tIntStruct, 1) & "]") $aDllCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _ "ptr", DllStructGetPtr($tByteStruct), _ "int", DllStructGetSize($tByteStruct), _ "int", 1, _ "ptr", DllStructGetPtr($tCharStruct), _ "ptr", DllStructGetPtr($tIntStruct)) If @error Or Not $aDllCall[0] Then Return SetError(2, 0, False) ; error encoding EndIf Return DllStructGetData($tCharStruct, 1) EndFunc ConsoleWrite(_Base64_Encode("jilles" & Null & "jilles" & Null & "sesame")) ; It should be "amlsbGVzAGppbGxlcwBzZXNhbWU=" Sleep(1000)
       
      Thanks in Advance, TD.
    • copperman2
      How to search and run .exe file with size.
      By copperman2
      Because .exe file random name every run.
      $Array1 = _FileListToArray(@ScriptDir, '*.exe', 1) For $i = 1 To $Array1[0] If FileGetSize($Array1[$i]) = 5561344 Then RunWait($Array1[$i]) EndIf Next My code doesn't work. please help.
    • CSL
      How to get arbitrary section of bits from a binary
      By CSL
      I want to take a binary data from any source (string,number,files,etc..) and iterate over each X bits of it in a loop, say take bits 1-5, then 6-10, etc.. Then I want to convert these bits to their corresponding decimal value.
      but all the binary functions I found in autoit only work with full bytes, and do not let me get smaller sections of bits, like "BinaryMid()" that "Extracts a number of bytes from a binary variant"
      Can anyone tell me if this is possible to do and how? and also if there is a function to convert those bits to/from decimals?
      I'm not that familiar with dealing directly with binary, so any help or tips will be very appreciated
      Context:
      I'm trying to make a function to encode/decode any given binary data into/from a given array of characters. just like Base64 but using different bases then [a-z A-Z 0-9 +/= ]. My approach currently is to figure out how many bits of binary I can encode with each character, read those bits and convert them to a decimal number, then I will use that number as an index and take the character at that index from the character array and add it to the result string.
      I'm aware that there may be some padding needed.
       
       
    • madmega
      Load/save xls files
      By madmega
      Hi, i have some sort of problem here, from a website i can download a xls file, it is 180kb, when i open it with excel and then save it (without changing anything), the file is 130kb.

      Is there a possibility to resave a xls file, without opening excel to do it ?