mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 12:57:42 +00:00
cf7af17b43
* feat(table-catalog): wire durable strong backing config * fix(table-catalog): guard strong backing warehouse prefixes * fix(checksums): remove unused base64 decode helper --------- Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com>
25 lines
838 B
Rust
25 lines
838 B
Rust
// Copyright 2024 RustFS Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
#![allow(dead_code)]
|
|
|
|
use base64_simd::STANDARD;
|
|
|
|
pub(crate) fn encode(input: impl AsRef<[u8]>) -> String {
|
|
STANDARD.encode_to_string(input.as_ref())
|
|
}
|
|
|
|
pub(crate) fn encoded_length(length: usize) -> usize {
|
|
STANDARD.encoded_length(length)
|
|
}
|