1#  File src/library/base/R/raw.R
2#  Part of the R package, https://www.R-project.org
3#
4#  Copyright (C) 1995-2020 The R Core Team
5#
6#  This program is free software; you can redistribute it and/or modify
7#  it under the terms of the GNU General Public License as published by
8#  the Free Software Foundation; either version 2 of the License, or
9#  (at your option) any later version.
10#
11#  This program is distributed in the hope that it will be useful,
12#  but WITHOUT ANY WARRANTY; without even the implied warranty of
13#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14#  GNU General Public License for more details.
15#
16#  A copy of the GNU General Public License is available at
17#  https://www.R-project.org/Licenses/
18
19raw <- function(length = 0L) .Internal(vector("raw", length))
20
21#as.raw <- function(x) .Internal(as.raw(x))
22
23charToRaw <- function(x) .Internal(charToRaw(x))
24rawToChar <- function(x, multiple=FALSE) .Internal(rawToChar(x, multiple))
25
26rawShift <- function(x, n) .Internal(rawShift(x, n))
27
28rawToBits <- function(x) .Internal(rawToBits(x))
29intToBits <- function(x) .Internal(intToBits(x))
30
31numToInts <- function(x) .Internal(numToInts(x))
32numToBits <- function(x) .Internal(numToBits(x))
33
34packBits <- function(x, type=c("raw", "integer", "double"))
35{
36    type <- match.arg(type)
37    .Internal(packBits(x, type))
38}
39
40utf8ToInt <- function(x) .Internal(utf8ToInt(x))
41intToUtf8 <- function(x, multiple = FALSE, allow_surrogate_pairs = FALSE)
42    .Internal(intToUtf8(x, multiple, allow_surrogate_pairs))
43
44validUTF8 <- function(x) .Internal(validUTF8(x))
45validEnc <- function(x) .Internal(validEnc(x))
46