45 def base64(s: String): Bytes = { |
45 def base64(s: String): Bytes = { |
46 val a = Base64.getDecoder.decode(s) |
46 val a = Base64.getDecoder.decode(s) |
47 new Bytes(a, 0, a.length) |
47 new Bytes(a, 0, a.length) |
48 } |
48 } |
49 |
49 |
50 object Decode_Base64 extends Scala.Fun("decode_base64") { |
50 object Decode_Base64 extends Scala.Fun("decode_base64") with Scala.Fun_Single_Bytes { |
51 val here = Scala_Project.here |
51 val here = Scala_Project.here |
52 def invoke(args: List[Bytes]): List[Bytes] = |
52 def invoke(args: List[Bytes]): List[Bytes] = |
53 List(base64(Library.the_single(args).text)) |
53 List(base64(Library.the_single(args).text)) |
54 } |
54 } |
55 |
55 |
56 object Encode_Base64 extends Scala.Fun("encode_base64") { |
56 object Encode_Base64 extends Scala.Fun("encode_base64") with Scala.Fun_Single_Bytes { |
57 val here = Scala_Project.here |
57 val here = Scala_Project.here |
58 def invoke(args: List[Bytes]): List[Bytes] = |
58 def invoke(args: List[Bytes]): List[Bytes] = |
59 List(Bytes(Library.the_single(args).base64)) |
59 List(Bytes(Library.the_single(args).base64)) |
60 } |
60 } |
61 |
61 |
62 |
62 |
63 /* XZ compression */ |
63 /* XZ compression */ |
64 |
64 |
65 object Compress extends Scala.Fun("compress") { |
65 object Compress extends Scala.Fun("compress") with Scala.Fun_Single_Bytes { |
66 val here = Scala_Project.here |
66 val here = Scala_Project.here |
67 def invoke(args: List[Bytes]): List[Bytes] = |
67 def invoke(args: List[Bytes]): List[Bytes] = |
68 List(Library.the_single(args).compress()) |
68 List(Library.the_single(args).compress()) |
69 } |
69 } |
70 |
70 |
71 object Uncompress extends Scala.Fun("uncompress") { |
71 object Uncompress extends Scala.Fun("uncompress") with Scala.Fun_Single_Bytes { |
72 val here = Scala_Project.here |
72 val here = Scala_Project.here |
73 def invoke(args: List[Bytes]): List[Bytes] = |
73 def invoke(args: List[Bytes]): List[Bytes] = |
74 List(Library.the_single(args).uncompress()) |
74 List(Library.the_single(args).uncompress()) |
75 } |
75 } |
76 |
76 |