equal
deleted
inserted
replaced
39 new Bytes(b, 0, b.length) |
39 new Bytes(b, 0, b.length) |
40 } |
40 } |
41 |
41 |
42 val newline: Bytes = apply("\n") |
42 val newline: Bytes = apply("\n") |
43 |
43 |
|
44 |
|
45 /* base64 */ |
|
46 |
44 def base64(s: String): Bytes = |
47 def base64(s: String): Bytes = |
45 { |
48 { |
46 val a = Base64.getDecoder.decode(s) |
49 val a = Base64.getDecoder.decode(s) |
47 new Bytes(a, 0, a.length) |
50 new Bytes(a, 0, a.length) |
|
51 } |
|
52 |
|
53 object Decode_Base64 extends Scala.Fun("decode_base64") |
|
54 { |
|
55 val here = Scala_Project.here |
|
56 def invoke(args: List[Bytes]): List[Bytes] = |
|
57 List(base64(Library.the_single(args).text)) |
|
58 } |
|
59 |
|
60 object Encode_Base64 extends Scala.Fun("encode_base64") |
|
61 { |
|
62 val here = Scala_Project.here |
|
63 def invoke(args: List[Bytes]): List[Bytes] = |
|
64 List(Bytes(Library.the_single(args).base64)) |
48 } |
65 } |
49 |
66 |
50 |
67 |
51 /* read */ |
68 /* read */ |
52 |
69 |