|
|
@ -14,7 +14,7 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
import { |
|
|
|
createObjectURL, FormatError, isSpace, shadow, Util |
|
|
|
createObjectURL, FormatError, isSpace, shadow, stringToBytes, Util |
|
|
|
} from '../shared/util'; |
|
|
|
} from '../shared/util'; |
|
|
|
import { isDict } from './primitives'; |
|
|
|
import { isDict } from './primitives'; |
|
|
|
import { JpegImage } from './jpg'; |
|
|
|
import { JpegImage } from './jpg'; |
|
|
@ -109,11 +109,7 @@ var Stream = (function StreamClosure() { |
|
|
|
|
|
|
|
|
|
|
|
var StringStream = (function StringStreamClosure() { |
|
|
|
var StringStream = (function StringStreamClosure() { |
|
|
|
function StringStream(str) { |
|
|
|
function StringStream(str) { |
|
|
|
var length = str.length; |
|
|
|
let bytes = stringToBytes(str); |
|
|
|
var bytes = new Uint8Array(length); |
|
|
|
|
|
|
|
for (var n = 0; n < length; ++n) { |
|
|
|
|
|
|
|
bytes[n] = str.charCodeAt(n); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Stream.call(this, bytes); |
|
|
|
Stream.call(this, bytes); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|