Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9913967
nancoding.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
908 B
Referenced Files
None
Subscribers
None
nancoding.js
View Options
const
e
=
new
TextEncoder
();
const
d
=
new
TextDecoder
();
function
NaNcode
(
string
)
{
const
encoded
=
Array
.
from
(
e
.
encode
(
string
));
encoded
.
unshift
(
0
,
0
,
0
,
0
,
0
,
0
);
while
(
encoded
.
length
%
6
)
encoded
.
push
(
0
);
const
bytes
=
[];
let
i
=
0
;
while
(
encoded
.
length
)
{
bytes
.
push
(
encoded
.
shift
());
i
++
;
if
(
!
(
i
%
6
))
bytes
.
push
(
248
,
127
);
}
return
Array
.
from
(
new
Float64Array
(
new
Uint8Array
(
bytes
).
buffer
));
}
function
unNaNcode
(
NaNs
)
{
const
raw
=
new
Uint8Array
(
new
Float64Array
(
NaNs
).
buffer
);
let
count
=
0
;
for
(
let
i
=
0
;
i
<
raw
.
length
;
i
++
)
{
if
(
i
%
8
<
6
&&
raw
[
i
]
!==
0
)
count
++
;
}
const
bytes
=
new
Uint8Array
(
count
);
let
j
=
0
;
for
(
let
i
=
0
;
i
<
raw
.
length
;
i
++
)
{
if
(
i
%
8
<
6
&&
raw
[
i
]
!==
0
)
bytes
[
j
++
]
=
raw
[
i
];
}
return
d
.
decode
(
bytes
);
}
const
NaNcoded
=
NaNcode
(
'Hello, World! :D'
);
console
.
log
(
NaNcoded
,
unNaNcode
(
NaNcoded
));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 1, 6:51 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
588188
Default Alt Text
nancoding.js (908 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment