15,886,362 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by albert_redditt (Top 1 by date)
albert_redditt
10-Sep-21 13:22pm
View
Deleted
Here's the main loop : It's for a data compressor...
Currently it's set for 1,000,000 bytes.. or 8,000,000 bits , input.
It takes 250 loops through the below loop..
It's currently taking 40 to 45 seconds to do the 250 loops..
10,000,000 bytes in , would take 10 times longer , 450 seconds..
dim as string outs = ""
dim as string n2
dim as longint v1 , v2 , v3 , v4 , v5
for a as longint = 1 to len( bits ) step 6
n1 = mid( bits , a , 6 )
v1 = ( ( n1[ 0 ] - 48 ) * 2 ) + ( n1[ 1 ] - 48 ) + 1
v2 = ( ( n1[ 2 ] - 48 ) * 2 ) + ( n1[ 3 ] - 48 ) + 1
v3 = ( ( n1[ 4 ] - 48 ) * 2 ) + ( n1[ 5 ] - 48 ) + 1
v4 = ( v1 + v2 ) - 1
v5 = ( v2 + v3 ) - 1
if v2 mod 2 = 1 then v4+= 8
if v2 mod 2 = 0 then v5+= 8
n2 = "00"
if v4 < 10 then n2[ 0 ] = 48 + v4 else n2[ 0 ] = 65 + ( v4 - 10 )
if v5 < 10 then n2[ 1 ] = 48 + v5 else n2[ 1 ] = 65 + ( v5 - 10 )
outs+= n2
'print n2
'sleep
'if inkey = " " then end
next