Jump to content

Recommended Posts

Posted

Take a look at this

MY 30th NEWB POST =D

<{POST_SNAPBACK}>

This thing is very nice for learning purpose (did it myself, so i to learned it the hard way :( in my early days)

Compression is a very tricky

In the current form you will never get a file that is smaler then the original:

(that is AutoIt can't handle binary's well, so it's limitid to strings)

- it dous convert "AAAAAA" to "A(6) for strings, and strings are text, and text are words => i dont now of any words that have more then twice the same char => becommes only bigger then because "AA" wil become "A(2)" and that is twice the size

- now you should say hey, text has no binary data i can't read so if i convert to pure binary then it has some use because "11111100000111100010111" can be easely done this way because you have only got 2 char's (not realy, but ... : ) to deal with.

Stuck again, try to write that result to a file and you'l now wat i mean.

I try'd some stuff back then in python that can handle binary files. I was tingking about: If i can convert a binaryfile to Text and keep the size +- the same and then ZIP it or somthing i was gonna get a file that was a lot smaler (compressing text is a huge size down). But NOPE, F*cç)àé"&é@##"éé damn

- now i was a bit stubburn (still am :( ) and dont wanted to give up so i made a hex pattern searcher, first of all: it not so easy to do and second: IT'S DAMN SLOW (did that in python, and it was 150 seconds for a 10mb file) and tird: the profits i made was as good as nothing. Did not get the filesize under 190% off the original, now when i zipped it it was somting off 98% of the original and that was only because i wrote the file in Hex so the zip util had only to binary the thing to get the size down.

SO NOTE: I GAVE UP (but it still crosses my mind occasionaly)

  • 1 month later...
  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (edited)

want to know the truth? nobody will use AutoZip. normal zip is "better", don't you think?

<{POST_SNAPBACK}>

that was the meanest first post I've ever seen :)

EDIT: we can now handle binary files with larrys great API*** UDF's!!!!!!!!!!!!!!!! :evil:

Edited by layer
FootbaG
Posted

$begin = TimerInit()
for $i=1 to 1000000
next
$dif = TimerDiff($begin)
MsgBox(0,"Time Difference",$dif)

took 5949.24189010312 milliseconds

$begin = TimerInit()
for $i=1 to 1000000
sleep(0)
next
$dif = TimerDiff($begin)
MsgBox(0,"Time Difference",$dif)

took 11825.0478313068 milliseconds

The fact that autoit still calls the function still causes a delay. You guys need to remember that when you have this one process, it runs at 100% cpu usage. If you were to split it into 2, you would get 2 50% usage processes. They run at half the speed, but there's 2 of them - in the end you get the same result. I have had this idea and tried it too, and this is what I have concluded. Even if you added sleeps and used multiple proccesses, the fastest way to do this is still having one proccess with no sleeps - this is max cpu usage, the fastest.

The poster above tried to find a way to lower cpu usage while not making the execution slower - when the whole reason the cpu usage drops is because the script IS slower.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...