-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parity between browser and node using binary encoding
- Loading branch information
James Halliday
committed
Jun 4, 2015
1 parent
a549fca
commit 123fd37
Showing
5 changed files
with
29 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
exports.btoa = function (s) { return Buffer(s).toString('base64') } | ||
exports.atob = function (s) { return Buffer(s, 'base64').toString() } | ||
exports.btoa = function (s) { return Buffer(s, 'binary').toString('base64') } | ||
exports.atob = function (s) { return Buffer(s, 'base64').toString('binary') } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
var min = require('../'); | ||
console.log(min.expand( | ||
'O,tCjVOmVGpVZjCem/,dOU77RWjJ8qQNb5OTz6D+U7h,wq7Dm8K+fsKbF0XCp8KlVEDCqGYZEVzD' | ||
+ 'sjTDiArCucKFMnAJLsKpwpHCosKCw6hx' | ||
'O,tCjVOmVGpVZjCem/,dOU77RWjJ8qQNb5OTz6D+U7h,wq7Dm8K+fsKbF0XCp8KlVEDCqGYZEVz' | ||
+ 'DsjTDiArCucKFMnAJLsKpwpHCosKCw6hx' | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
var min = require('../'); | ||
console.log(min.reduce({ | ||
'sdp':'v=0\r\no=- 5569982971256804497 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na' | ||
+ '=msid-semantic: WMS\r\nm=application 53110 DTLS/SCTP 5000\r\nc=IN IP4 14' | ||
+ '2.254.26.9\r\na=candidate:3338612916 1 udp 2122194687 192.168.186.18 531' | ||
+ '10 typ host generation 0\r\na=candidate:2289880132 1 tcp 1518214911 192.' | ||
+ '168.186.18 0 typ host tcptype active generation 0\r\na=candidate:1752471' | ||
+ '43 1 udp 1685987071 142.254.26.9 53110 typ srflx raddr 192.168.186.18 rp' | ||
+ 'ort 53110 generation 0\r\na=ice-ufrag:tCjVOmVGpVZjCem/\r\na=ice-pwd:dOU7' | ||
+ '7RWjJ8qQNb5OTz6D+U7h\r\na=ice-options:google-ice\r\na=fingerprint:sha-25' | ||
+ '6 AE:DB:BE:7E:9B:17:45:A7:A5:54:40:A8:66:19:11:5C:F2:34:C8:0A:B9:85:32:7' | ||
+ '0:09:2E:A9:91:A2:82:E8:71\r\na=setup:actpass\r\na=mid:data\r\na=sctpmap:' | ||
+ '5000 webrtc-datachannel 1024\r\n', | ||
'type':'offer' | ||
type: 'offer', | ||
sdp: 'v=0\r\no=- 5498186869896684180 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na' | ||
+ '=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0' | ||
+ '.0\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\na=setup:a' | ||
+ 'ctpass\r\na=ice-ufrag:tCjVOmVGpVZjCem/\r\na=ice-pwd:dOU77RWjJ8qQNb5OTz6' | ||
+ 'D+U7h\r\na=fingerprint:sha-256 C2:AE:C3:9B:C2:BE:7E:C2:9B:17:45:C2:A7:C' | ||
+ '2:A5:54:40:C2:A8:66:19:11:5C:C3:B2:34:C3:88:0A:C2:B9:C2:85:32:70:09:2E:' | ||
+ 'C2:A9:C2:91:C2:A2:C2:82:C3:A8:71\r\na=candidate:0 1 udp 1 0.0.0.0 typ ' | ||
+ 'host\r\n' | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters