Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tape = peripheral.find("tape_drive")
- data = 1
- h = http.get("https://my.mixtape.moe/ztnkpu.dfpwm", nil, true)
- local blockSize = 8192 -- how many bytes to read at a time
- tape.stop()
- tape.seek(-tape.getSize())
- repeat
- local bytes = {}
- for i = 1, blockSize do -- only read 8192 bytes at a time
- local byte = h.read()
- if not byte then break end -- if we're done, stop reading
- bytes[#bytes + 1] = byte -- add the byte to bytes
- end
- if #bytes > 0 then
- print("Still going... " .. os.epoch())
- for i = 1, #bytes do
- tape.write(bytes[i])
- end
- sleep(0)
- end
- until not bytes or #bytes <= 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement