Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mongo/src/utils/saslprep/deps.ts>Bitfield

MongoDB driver for Deno
Extremely Popular
Go to Latest
class Bitfield
import { Bitfield } from "https://deno.land/x/mongo@v0.31.2/src/utils/saslprep/deps.ts";

A class representation of a bitfield.

Constructors

new
Bitfield(opts?: Uint8Array | BitfieldOptions)

Creates a bitfield instance.

Properties

private
_pageMask: number
private
_trackUpdates: boolean
byteLength: number
length: number
readonly
pageOffset: number
readonly
pages: Pager
readonly
pageSize: number

Methods

get(i: number): boolean

Gets a bit.

getByte(i: number): number

Gets a byte.

set(i: number, v: boolean): boolean

Sets a bit.

setByte(i: number, b: number): boolean

Sets a byte.

toBuffer(): Uint8Array

Gets a single buffer representing the entire bitfield.