write-ups-challenges-2020-2021/scrambled_message/scrambled_message_solution.rkt

16 lines
359 B
Racket
Raw Normal View History

2022-11-24 17:03:20 +00:00
#lang racket
(require rnrs/bytevectors-6)
(require rnrs/io-ports-6)
(define file (open-file-input-port "memory.bin"))
;; Reads all the bytes from the input-port (for example a file)
;; and returns a byte vector
(define (read-all-bytes input-port)
(get-bytevector-all input-port))
(define contents (read-all-bytes file))
;; Thats all we got, good luck!