-
Notifications
You must be signed in to change notification settings - Fork 576
/
util.ts
49 lines (44 loc) · 1.48 KB
/
util.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import { copyN as _copyN } from "./copy_n.ts";
import { readShort as _readShort } from "./read_short.ts";
import { readInt as _readInt } from "./read_int.ts";
import { readLong as _readLong } from "./read_long.ts";
import { sliceLongToBytes as _sliceLongToBytes } from "./slice_long_to_bytes.ts";
/**
* @deprecated (will be removed after 0.170.0) Import from `std/io/copy_reader.ts` instead
*
* Copy N size at the most. If read size is lesser than N, then returns nread
* @param r Reader
* @param dest Writer
* @param size Read size
*/
export const copyN = _copyN;
/**
* @deprecated (will be removed after 0.170.0) Import from `std/io/read_short.ts` instead
*
* Read big endian 16bit short from BufReader
* @param buf
*/
export const readShort = _readShort;
/**
* @deprecated (will be removed after 0.170.0) Import from `std/io/read_int.ts` instead
*
* Read big endian 32bit integer from BufReader
* @param buf
*/
export const readInt = _readInt;
/**
* @deprecated (will be removed after 0.170.0) Import from `std/io/read_long.ts` instead
*
* Read big endian 64bit long from BufReader
* @param buf
*/
export const readLong = _readLong;
/**
* @deprecated (will be removed after 0.170.0) Import from `std/io/slice_long_to_bytes.ts` instead
*
* Slice number into 64bit big endian byte array
* @param d The number to be sliced
* @param dest The sliced array
*/
export const sliceLongToBytes = _sliceLongToBytes;