use napi_derive::napi;
use napi::Result;
use crate::binary::BinaryStream;
use crate::stream::Endianness;
use crate::types::Short;
#[napi]
impl BinaryStream {
#[napi]
pub fn read_short(&mut self, endian: Option<Endianness>) -> Result<i16> {
Short::read(self, endian)
}
#[napi]
pub fn write_short(&mut self, value: i16, endian: Option<Endianness>) {
Short::write(self, value, endian);
}
}