Search found 5579 matches

by dodicat
Mar 24, 2019 11:53
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

badidea wrote:Without a working decompressor, your compressor is just a fancy hash generator.

Looking into cryogenics I note that people will pay about 200000 dollars for the process, and for the less well heeled, about 80000 dollars a head (literally).
So these half way processes have value.
by dodicat
Mar 23, 2019 21:12
Forum: Tips and Tricks
Topic: Spring is in the air.
Replies: 2
Views: 215

Spring is in the air.

Some old routines amalgamated with some very old. After reading some guff about compression algorithms, I decide to ignore all the gobbledegook and follow a true compressor (Robert Boyle), who simply called compression of air -- the natural spring of air--, and no doubt, If he was here now, he would...
by dodicat
Mar 23, 2019 0:34
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 30
Views: 1287

Re: topic proposal: differences/changes when you move to multithread

Why not use a namespace to hold variables and various functions. They are then global but not seen until explicitly called. #include "fbthread.bi" Namespace g Dim As Long MySpeed=400 Dim As Integer mystop Dim thread As Any Ptr Function Regulate(Byval MyFps As Long,Byref fps As Long) As Lon...
by dodicat
Mar 23, 2019 0:00
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Hi Albert. Another example of strings in the .exe. dim as string id1= "ALBERT'S secret string" dim as string id2="abcdefghijk" #Include "file.bi" Function loadfile(file As String) As String If Fileexists(file)=0 Then Print file;" not found":Sleep:End Var f=Fre...
by dodicat
Mar 22, 2019 22:49
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

A very simple way to include a string in an executable would be to create a string somewhere in your code. (strings are saved in a .exe) simple idea albert.bas sub ID var secret="ALBERT'S secret string" end sub compile to albert.exe. The string will be in the .exe. Test #Include "file...
by dodicat
Mar 22, 2019 11:22
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Perhaps something simple, but the position in the file is predetermined, 123 here. #Include "file.bi" Sub savefile(filename As String,p As String) Dim As Integer n n=Freefile If Open (filename For Binary Access Write As #n)=0 Then Put #n,,p Close Else Print "Unable to save " + fi...
by dodicat
Mar 19, 2019 22:09
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Hi Albert.
I don't know why zlib is not compressing your base 256 string, but random data doesn't compress very well anyway.
Also, windows zip doesn't compress it either.
7-zip doesn't compress it either.
So the closest thing to a black hole yet, by way of squeeze, is a random base 256 string.
by dodicat
Mar 18, 2019 20:09
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Hi albert.
If you use 64 bit fb then the .dll can be downloaded from the link I gave.
you would then
#inclib "zlib"
because the lib is called zlib.dll.
Of course zlib.dll must be in the same folder as any code calling it.
by dodicat
Mar 18, 2019 17:36
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

zlib1 comes with fb1.06 (in the bin win32 folder)
I got the 64 bit one here
https://www.dll4free.com/zlib.dll.html


for 64 bits
#inclib "zlib"
instead of zlib1
by dodicat
Mar 18, 2019 11:40
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Hi Albert. I have re-done this for strings. I use callocate now instead of allocate to try and deallocate better. Namespace Zlibrary #inclib "zlib1" Extern "C" Declare Function compressBound(Byval sourceLen As Ulong) As Ulong Declare Function uncompress(Byval dest As Ubyte Ptr, B...
by dodicat
Mar 18, 2019 4:13
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Hi Albert.
Using the same setup but only with strings.

Code: Select all

see next post down
 
by dodicat
Mar 18, 2019 1:00
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Create a temp file and pass your string to it, then when you are finished with it, delete the temp file. #inclib "zlib1" Extern "C" Declare Function compressBound(Byval sourceLen As Ulong) As Ulong Declare Function uncompress(Byval dest As Ubyte Ptr, Byval destLen As Ulong Ptr, B...
by dodicat
Mar 18, 2019 0:01
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

zlib1.dll comes with the 32 bit windows version 1.06 at the top write in the lib you want to use. The .bi file is not needed, I have called the three required functions myself. everything is in a namespace packer. #inclib "zlib1" Extern "C" Declare Function compressBound(Byval so...
by dodicat
Mar 17, 2019 21:57
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

In win 10 powershell does the job. #Include "file.bi" sub compress(filein as string,fileout as string) shell "powershell Compress-Archive " +curdir +"\"+ filein+ " " + fileout end sub sub uncompress(filein as string,newfolder as string) shell "powershell ...
by dodicat
Mar 15, 2019 22:18
Forum: General
Topic: Squares
Replies: 6321
Views: 358279

Re: Squares

Have you got gmp Albert?

Go to advanced search