|
|
|
@ -25,7 +25,8 @@ where S: AsRef<[u8]>,
|
|
|
|
|
let input_bytes = input.as_ref();
|
|
|
|
|
let output_bytes = output.as_mut();
|
|
|
|
|
|
|
|
|
|
Ok(base64::decode_config_slice(input_bytes, base64::STANDARD, output_bytes)?)
|
|
|
|
|
//panic!("{:?}", std::str::from_utf8(input_bytes).expect("XXX fatal"));
|
|
|
|
|
Ok(base64::decode_config_slice(input_bytes, base64::STANDARD, output_bytes)?) // XXX: This fails
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Calculate the size for a base64 inpue
|
|
|
|
@ -107,12 +108,6 @@ impl BasedLoli
|
|
|
|
|
self.size_decoded
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Attempt to decode to a child container
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn decode(&self, loli: &mut Loli) -> Result<usize, error::Error>
|
|
|
|
|
{
|
|
|
|
|
decode(self, loli)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<'a> LoliBounds<'a>
|
|
|
|
@ -138,6 +133,15 @@ impl<'a> LoliBounds<'a>
|
|
|
|
|
file: file,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Attempt to decode to a child container of our owner
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn decode(&self, loli: &mut Loli) -> Result<usize, error::Error>
|
|
|
|
|
{
|
|
|
|
|
let bytes = self.loli.bytes();
|
|
|
|
|
|
|
|
|
|
decode(&bytes[self.range.clone()], loli)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl AsRef<[u8]> for BasedLoli
|
|
|
|
|