Magic Box is named after initial blueprint of any size of world data is compressed to lowest possible weight and reconstruct it with out considering required time and space. Later on it is developed as World data representer. Finally, the concept become implementable for realworld data compression using direct mapping as demonstrated this repository.
Mapping based Lossless Data Compression Technique conceptualized from Theoretical Proof of A Lossless Compression Technique : Representing World Data into a Single Bit.
It uses tree traversal and Segmentation for construction and reconstruction. This version of code is only for the reference of initial version of concept.
Easy way ! clone and run main.go .
sample result :
:~/magic-box$ go run main.go
Compressing World data into signle bit ! using two bit compressor
Compressed Single Bit (true for 1 and false for 0) is : false
Initially child node location and current node locations both are 0
Size of data 32
current node location is 0
for given i = 2 data array index = 30
Current node location is 0
Child node location is 0
for given i = 3 data array index = 29
Current node location is 0
Child node location is 0
for given i = 4 data array index = 28
Current node location is 0
Child node location is 0
for given i = 5 data array index = 27
Current node location is 0
Child node location is 0
for given i = 6 data array index = 26
Current node location is 0
Child node location is 0
for given i = 7 data array index = 25
Current node location is 0
Child node location is 0
for given i = 8 data array index = 24
Current node location is 0
Child node location is 0
for given i = 9 data array index = 23
Current node location is 0
Child node location is 1
for given i = 10 data array index = 22
Current node location is 1
Child node location is 3
for given i = 11 data array index = 21
Current node location is 3
Child node location is 7
for given i = 12 data array index = 20
Current node location is 7
Child node location is 15
for given i = 13 data array index = 19
Current node location is 15
Child node location is 31
for given i = 14 data array index = 18
Current node location is 31
Child node location is 63
for given i = 15 data array index = 17
Current node location is 63
Child node location is 127
for given i = 16 data array index = 16
Current node location is 127
Child node location is 255
for given i = 17 data array index = 15
Current node location is 255
Child node location is 511
for given i = 18 data array index = 14
Current node location is 511
Child node location is 1023
for given i = 19 data array index = 13
Current node location is 1023
Child node location is 2047
for given i = 20 data array index = 12
Current node location is 2047
Child node location is 4095
for given i = 21 data array index = 11
Current node location is 4095
Child node location is 8191
for given i = 22 data array index = 10
Current node location is 8191
Child node location is 16383
for given i = 23 data array index = 9
Current node location is 16383
Child node location is 32767
for given i = 24 data array index = 8
Current node location is 32767
Child node location is 65535
for given i = 25 data array index = 7
Current node location is 65535
Child node location is 131071
for given i = 26 data array index = 6
Current node location is 131071
Child node location is 262143
for given i = 27 data array index = 5
Current node location is 262143
Child node location is 524287
for given i = 28 data array index = 4
Current node location is 524287
Child node location is 1048575
for given i = 29 data array index = 3
Current node location is 1048575
Child node location is 2097151
for given i = 30 data array index = 2
Current node location is 2097151
Child node location is 4194303
for given i = 31 data array index = 1
Current node location is 4194303
Child node location is 8388607
for given i = 32 data array index = 0
Current node location is 8388607
Child node location is 16777215
Cordinate of data location:
*Node Location = 16777215
*Plane Height = 31
plane_height = 31
number_of_segment = 3
for plane_height 31 number_of_locations = 2147483648
beta1 = 715827884
beta2 = 715827882
beta3 = 715827882
locationmapper_beta1 715827884
locationmapper_beta2 1431655766
locationmapper_beta3 2147483648
initially located on beta1 , location is 16777215
Fly value 16777215
flyvalue 16777215
segment location 0
The size of node location is reduced from 16777215 to 16777215 total shifted to lower number is 0
Done construction
binary representation of node location: 111111111111111111111111
binary representation of fly location: 111111111111111111111111
binary representation of plane height 11111
Below for reconstruction
plane_height = 31
number_of_segment = 3
for plane_height 31 number_of_locations = 2147483648
beta1 = 715827884
beta2 = 715827882
beta3 = 715827882
locationmapper_beta1 715827884
locationmapper_beta2 1431655766
locationmapper_beta3 2147483648
located on 1st segment, location is 16777215
re-generated node locaiton 16777215
for given i = 0 data array index = 0
Current node location is 16777215
Parent node location is 8388607
for given i = 1 data array index = 1
Current node location is 8388607
Parent node location is 4194303
for given i = 2 data array index = 2
Current node location is 4194303
Parent node location is 2097151
for given i = 3 data array index = 3
Current node location is 2097151
Parent node location is 1048575
for given i = 4 data array index = 4
Current node location is 1048575
Parent node location is 524287
for given i = 5 data array index = 5
Current node location is 524287
Parent node location is 262143
for given i = 6 data array index = 6
Current node location is 262143
Parent node location is 131071
for given i = 7 data array index = 7
Current node location is 131071
Parent node location is 65535
for given i = 8 data array index = 8
Current node location is 65535
Parent node location is 32767
for given i = 9 data array index = 9
Current node location is 32767
Parent node location is 16383
for given i = 10 data array index = 10
Current node location is 16383
Parent node location is 8191
for given i = 11 data array index = 11
Current node location is 8191
Parent node location is 4095
for given i = 12 data array index = 12
Current node location is 4095
Parent node location is 2047
for given i = 13 data array index = 13
Current node location is 2047
Parent node location is 1023
for given i = 14 data array index = 14
Current node location is 1023
Parent node location is 511
for given i = 15 data array index = 15
Current node location is 511
Parent node location is 255
for given i = 16 data array index = 16
Current node location is 255
Parent node location is 127
for given i = 17 data array index = 17
Current node location is 127
Parent node location is 63
for given i = 18 data array index = 18
Current node location is 63
Parent node location is 31
for given i = 19 data array index = 19
Current node location is 31
Parent node location is 15
for given i = 20 data array index = 20
Current node location is 15
Parent node location is 7
for given i = 21 data array index = 21
Current node location is 7
Parent node location is 3
for given i = 22 data array index = 22
Current node location is 3
Parent node location is 1
for given i = 23 data array index = 23
Current node location is 1
Parent node location is 0
for given i = 24 data array index = 24
Current node location is 0
Parent node location is 0
for given i = 25 data array index = 25
Current node location is 0
Parent node location is 0
for given i = 26 data array index = 26
Current node location is 0
Parent node location is 0
for given i = 27 data array index = 27
Current node location is 0
Parent node location is 0
for given i = 28 data array index = 28
Current node location is 0
Parent node location is 0
for given i = 29 data array index = 29
Current node location is 0
Parent node location is 0
for given i = 30 data array index = 30
Current node location is 0
Parent node location is 0
**Retrieved original data:
[true true true true true true true true true true true true true true true true true true true true true true true true false false false false false false false false]
Done
Thesis for Master of Engineering in Computer Engineering
Er. Gopal Ojha (MECE 192959)
Supervison under Professor Dr. Roshan Chitrakar
Nepal College of Information Technology, Affiliated to Pokhara University
Nepal
TBD
Ongoing