File tree Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Original file line number Diff line number Diff line change
1
+ export { decodeBase64 , encodeBase64 } from "jsr:@std/encoding@0.217.0/base64" ;
1
2
export { dlopen } from "jsr:@denosaurs/plug@1.0.5" ;
2
3
export {
3
4
createDownloadURL ,
Original file line number Diff line number Diff line change @@ -970,30 +970,22 @@ lib.sk_init();
970
970
971
971
export default lib ;
972
972
973
- const {
974
- op_ffi_cstr_read,
975
- op_ffi_get_buf,
976
- op_base64_encode,
977
- op_base64_decode,
978
- } : {
979
- op_ffi_cstr_read : ( ptr : Deno . PointerValue ) => string ;
980
- op_ffi_get_buf : (
981
- ptr : Deno . PointerValue ,
982
- offset : number ,
983
- size : number ,
984
- ) => ArrayBuffer ;
985
- op_base64_encode : ( buf : Uint8Array ) => string ;
986
- op_base64_decode : ( base64 : string ) => Uint8Array ;
987
- // deno-lint-ignore no-explicit-any
988
- } = ( Deno as any ) [ ( Deno as any ) . internal ] . core . ops ;
989
-
990
973
export function cstr ( str : string ) {
991
974
return new TextEncoder ( ) . encode ( str + "\0" ) ;
992
975
}
993
976
994
- export {
995
- op_base64_decode as decodeBase64 ,
996
- op_base64_encode as encodeBase64 ,
997
- op_ffi_cstr_read as readCstr ,
998
- op_ffi_get_buf as getBuffer ,
999
- } ;
977
+ export function readCstr ( ptr : Deno . PointerValue ) : string {
978
+ return new Deno . UnsafePointerView ( ptr ! ) . getCString ( ) ;
979
+ }
980
+
981
+ export function getBuffer (
982
+ ptr : Deno . PointerValue ,
983
+ offset : number ,
984
+ size : number ,
985
+ ) : Uint8Array {
986
+ return new Uint8Array (
987
+ new Deno . UnsafePointerView ( ptr ! ) . getArrayBuffer ( size , offset ) ,
988
+ ) ;
989
+ }
990
+
991
+ export { decodeBase64 , encodeBase64 } from "../deps.ts" ;
You can’t perform that action at this time.
0 commit comments