Menu

#973 Banned From Forum

closed
nobody
None
other
2022-11-28
2022-11-27
No

Can you guys un-ban me , and allow me back on the FB forum...

This time i got a working compressor... Compresses any size file down to under 300 bytes..

Here's the compress loop

'===============================================
dim as string n1 , s1
for a as longint = 0 to len( chrs ) - 1 step 1

n1 = right( "00000000" + bin( chrs[a] ) , 8 )

s1 = "00000000"

'record every other bit
s1[0] = n1[0]
s1[1] = n1[2]
s1[2] = n1[4]
s1[3] = n1[6]

'check for , and make opposites
if n1[0] <> n1[1] then 
    if s1[0] = 48 then s1[4] = 49
    if s1[0] = 49 then s1[4] = 48
end if

if n1[2] <> n1[3] then 
    if s1[1] = 48 then s1[5] = 49
    if s1[1] = 49 then s1[5] = 48
end if

if n1[4] <> n1[5] then 
    if s1[2] = 48 then s1[6] = 49
    if s1[2] = 49 then s1[6] = 48
end if

if n1[6] <> n1[7] then 
    if s1[3] = 48 then s1[7] = 49
    if s1[3] = 49 then s1[7] = 48
end if

chrs[a] = val( "&B" + s1 )

next
'===============================================

Attached is:
1) Free BASIC source code
2) Windows executable
3) Zlib.dll ( zipper library )

1 Attachments

Related

Bugs: #980

Discussion

  • Jeff Marshall

    Jeff Marshall - 2022-11-28

    Why do you want to post this junk on the forum? And why should we allow it?

    You say:

    This time i got a working compressor... Compresses any size file down to under 300 bytes..

    So, right there I know your code won't work. It's impossible to compress any file down to a specific size.

    But, you were not banned because of your non-working code.

    You were banned from the forum because your attitude and method doesn't change and this has been going on for years and years. You don't actually check your code to see if it works or not. And we end up with actual hundreds of posts like this where it doesn't contribute anything useful to the community discussion and you ignore help from members and warnings from moderators.

    All it would take to see that your code doesn't work is to make a loop and just look at the output of encoding and then think about how to reverse the operation for decode. You should immediately see that you end up with duplicate encodings. This is something that users have tried to help you with for years, and you don't get it.

    Try it with a known string instead of a random string. And check the results. Compression is a terrible test to check if your code "works" when you haven't written a decoder or thought about what your code actually does.

    '' build a known string with all chars 0 to 255
    chrs = ""
    for i as integer = 0 to 255
      chrs += chr(i)
    next
    

    With your code posted in this ticket and a known string, I can see duplicates in the first few values:

    N1          S1
    00000000 -> 00000000
    00000001 -> 00000001
    00000010 -> 00010000
    00000011 -> 00010000 -- duplicate
    

    It only appears to compress because information is being thrown away. But we've gone over this time and time again on the forums.

    I won't un-ban you because I don't want your one-way kind of posts on the forum again. And after years and years, seems like we will get the same old thing on the forum.

     

    Last edit: Jeff Marshall 2022-11-28
  • Jeff Marshall

    Jeff Marshall - 2022-11-28
    • status: open --> closed
    • assigned_to: Matthew --> nobody
     

Log in to post a comment.