diff --git a/.gitignore b/.gitignore index d54cb23..2cb5f32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /target *.flac .vscode/settings.json + +.idea \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fa9e0f4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2024 Instaclustr + +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 + + https://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. \ No newline at end of file diff --git a/brro-compressor/benches/fft_bench.rs b/brro-compressor/benches/fft_bench.rs index 0153178..91946e5 100644 --- a/brro-compressor/benches/fft_bench.rs +++ b/brro-compressor/benches/fft_bench.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use brro_compressor::compressor::fft::{fft, fft_allowed_error, fft_set, fft_to_data, FFT}; use criterion::{black_box, criterion_group, criterion_main, Criterion}; diff --git a/brro-compressor/benches/polynomial_bench.rs b/brro-compressor/benches/polynomial_bench.rs index 01087c9..f96e37e 100644 --- a/brro-compressor/benches/polynomial_bench.rs +++ b/brro-compressor/benches/polynomial_bench.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ // Import necessary libraries use brro_compressor::compressor::polynomial::{ polynomial, polynomial_allowed_error, to_data, PolynomialType, diff --git a/brro-compressor/src/compare.rs b/brro-compressor/src/compare.rs index c34b172..074d941 100644 --- a/brro-compressor/src/compare.rs +++ b/brro-compressor/src/compare.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::{ compressor::{ constant::constant_compressor, diff --git a/brro-compressor/src/compressor/constant.rs b/brro-compressor/src/compressor/constant.rs index 4c399ff..4953512 100644 --- a/brro-compressor/src/compressor/constant.rs +++ b/brro-compressor/src/compressor/constant.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::{ compressor::CompressorResult, optimizer::utils::{Bitdepth, DataStats}, diff --git a/brro-compressor/src/compressor/fft.rs b/brro-compressor/src/compressor/fft.rs index a195138..c68542f 100644 --- a/brro-compressor/src/compressor/fft.rs +++ b/brro-compressor/src/compressor/fft.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::{optimizer::utils::DataStats, utils::error::calculate_error}; use bincode::{Decode, Encode}; use rustfft::{num_complex::Complex, FftPlanner}; diff --git a/brro-compressor/src/compressor/mod.rs b/brro-compressor/src/compressor/mod.rs index 475f838..9439530 100644 --- a/brro-compressor/src/compressor/mod.rs +++ b/brro-compressor/src/compressor/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use bincode::config::{self, Configuration}; use bincode::{Decode, Encode}; diff --git a/brro-compressor/src/compressor/noop.rs b/brro-compressor/src/compressor/noop.rs index 512d8ed..82504c3 100644 --- a/brro-compressor/src/compressor/noop.rs +++ b/brro-compressor/src/compressor/noop.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use super::BinConfig; use bincode::{Decode, Encode}; use log::{debug, info}; diff --git a/brro-compressor/src/compressor/polynomial.rs b/brro-compressor/src/compressor/polynomial.rs index 7f6a2a8..5b16347 100644 --- a/brro-compressor/src/compressor/polynomial.rs +++ b/brro-compressor/src/compressor/polynomial.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::optimizer::utils::{Bitdepth, DataStats}; use crate::utils::{error::calculate_error, round_and_limit_f64, round_f64, DECIMAL_PRECISION}; diff --git a/brro-compressor/src/data.rs b/brro-compressor/src/data.rs index 164ba6b..4c95ba5 100644 --- a/brro-compressor/src/data.rs +++ b/brro-compressor/src/data.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::compressor::{BinConfig, Compressor}; use crate::frame::CompressorFrame; use crate::header::CompressorHeader; diff --git a/brro-compressor/src/frame/mod.rs b/brro-compressor/src/frame/mod.rs index 08a5dc2..7b2ec13 100644 --- a/brro-compressor/src/frame/mod.rs +++ b/brro-compressor/src/frame/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::{compressor::Compressor, optimizer::utils::DataStats}; use bincode::{Decode, Encode}; use log::debug; diff --git a/brro-compressor/src/header.rs b/brro-compressor/src/header.rs index a93e7ae..239e9d3 100644 --- a/brro-compressor/src/header.rs +++ b/brro-compressor/src/header.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use bincode::{Decode, Encode}; /// This will write the file headers diff --git a/brro-compressor/src/lib.rs b/brro-compressor/src/lib.rs index 95fa5fd..5272708 100644 --- a/brro-compressor/src/lib.rs +++ b/brro-compressor/src/lib.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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(clippy::new_without_default)] // Lucas - Once the project is far enough along I strongly reccomend reenabling dead code checks #![allow(dead_code)] diff --git a/brro-compressor/src/main.rs b/brro-compressor/src/main.rs index 97a2738..479c6da 100644 --- a/brro-compressor/src/main.rs +++ b/brro-compressor/src/main.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use brro_compressor::compressor::Compressor; use brro_compressor::data::CompressedStream; use brro_compressor::optimizer::OptimizerPlan; diff --git a/brro-compressor/src/optimizer/mod.rs b/brro-compressor/src/optimizer/mod.rs index dfcff96..e387f14 100644 --- a/brro-compressor/src/optimizer/mod.rs +++ b/brro-compressor/src/optimizer/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::{ compressor::Compressor, types, diff --git a/brro-compressor/src/optimizer/utils.rs b/brro-compressor/src/optimizer/utils.rs index b2a4532..28e882f 100644 --- a/brro-compressor/src/optimizer/utils.rs +++ b/brro-compressor/src/optimizer/utils.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use bincode::{Decode, Encode}; use log::debug; diff --git a/brro-compressor/src/types/metric_tag.rs b/brro-compressor/src/types/metric_tag.rs index ff89342..13260e7 100644 --- a/brro-compressor/src/types/metric_tag.rs +++ b/brro-compressor/src/types/metric_tag.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use median::Filter; #[derive(Debug)] diff --git a/brro-compressor/src/types/mod.rs b/brro-compressor/src/types/mod.rs index 88c599e..e9992ca 100644 --- a/brro-compressor/src/types/mod.rs +++ b/brro-compressor/src/types/mod.rs @@ -1 +1,16 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ pub mod metric_tag; diff --git a/brro-compressor/src/utils/error.rs b/brro-compressor/src/utils/error.rs index 2c46797..624308b 100644 --- a/brro-compressor/src/utils/error.rs +++ b/brro-compressor/src/utils/error.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use std::cmp; #[derive(Default, Debug, Clone)] diff --git a/brro-compressor/src/utils/mod.rs b/brro-compressor/src/utils/mod.rs index 255dd23..e6263ea 100644 --- a/brro-compressor/src/utils/mod.rs +++ b/brro-compressor/src/utils/mod.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ pub mod error; pub mod readers; pub mod writers; diff --git a/brro-compressor/src/utils/readers/bro_reader.rs b/brro-compressor/src/utils/readers/bro_reader.rs index 22047cf..ac572f1 100644 --- a/brro-compressor/src/utils/readers/bro_reader.rs +++ b/brro-compressor/src/utils/readers/bro_reader.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ // Implement a streaming reader here use std::fs; use std::fs::File; diff --git a/brro-compressor/src/utils/readers/mod.rs b/brro-compressor/src/utils/readers/mod.rs index b2ab21c..2e41834 100644 --- a/brro-compressor/src/utils/readers/mod.rs +++ b/brro-compressor/src/utils/readers/mod.rs @@ -1 +1,16 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ pub mod bro_reader; diff --git a/brro-compressor/tests/integration_test.rs b/brro-compressor/tests/integration_test.rs index e35add1..adfd04e 100644 --- a/brro-compressor/tests/integration_test.rs +++ b/brro-compressor/tests/integration_test.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use tempfile::tempdir; #[test] diff --git a/csv-compressor/src/csv.rs b/csv-compressor/src/csv.rs index ff6f0f4..06e1ba0 100644 --- a/csv-compressor/src/csv.rs +++ b/csv-compressor/src/csv.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use serde::{Deserialize, Serialize}; use std::fs::{File, OpenOptions}; use std::path::Path; diff --git a/csv-compressor/src/main.rs b/csv-compressor/src/main.rs index 032a5d4..7757038 100644 --- a/csv-compressor/src/main.rs +++ b/csv-compressor/src/main.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::metric::Metric; use brro_compressor::compressor::Compressor; use brro_compressor::data::CompressedStream; diff --git a/csv-compressor/src/metric.rs b/csv-compressor/src/metric.rs index f568b56..328a8e1 100644 --- a/csv-compressor/src/metric.rs +++ b/csv-compressor/src/metric.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use crate::csv::Sample; use std::fmt::{Debug, Display, Formatter}; use std::path::Path; diff --git a/optimizer/src/main.rs b/optimizer/src/main.rs index b6b563b..8202e71 100644 --- a/optimizer/src/main.rs +++ b/optimizer/src/main.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ // Lucas - Once the project is far enough along I strongly reccomend reenabling dead code checks #![allow(dead_code)] diff --git a/prometheus-remote/src/flac_reader.rs b/prometheus-remote/src/flac_reader.rs index a87c1b5..691d038 100644 --- a/prometheus-remote/src/flac_reader.rs +++ b/prometheus-remote/src/flac_reader.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use std::fs::File; use symphonia::core::audio::SampleBuffer; diff --git a/prometheus-remote/src/fs_utils.rs b/prometheus-remote/src/fs_utils.rs index 9ca62f2..eae9a86 100644 --- a/prometheus-remote/src/fs_utils.rs +++ b/prometheus-remote/src/fs_utils.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use chrono::{DateTime, Duration, Utc}; /// All the utils/code related the to file management /// diff --git a/prometheus-remote/src/lib_vsri.rs b/prometheus-remote/src/lib_vsri.rs index 8acec72..dc3bb3b 100644 --- a/prometheus-remote/src/lib_vsri.rs +++ b/prometheus-remote/src/lib_vsri.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use chrono::{DateTime, Timelike, Utc}; /// Very Small Rolo Index /// This is an index made for detection of gaps in continuous data with the same sampling rate. diff --git a/prometheus-remote/src/main.rs b/prometheus-remote/src/main.rs index dd36cb2..556d182 100644 --- a/prometheus-remote/src/main.rs +++ b/prometheus-remote/src/main.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ // Lucas - Once the project is far enough along I strongly reccomend reenabling dead code checks #![allow(dead_code)] diff --git a/prometheus-remote/src/wav_writer.rs b/prometheus-remote/src/wav_writer.rs index ee8c997..1b0bb94 100644 --- a/prometheus-remote/src/wav_writer.rs +++ b/prometheus-remote/src/wav_writer.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use chrono::{DateTime, Utc}; use hound::{WavSpec, WavWriter}; use std::fs::File; diff --git a/tools/src/bin/dwt_finder.rs b/tools/src/bin/dwt_finder.rs index 14fc480..27e3283 100644 --- a/tools/src/bin/dwt_finder.rs +++ b/tools/src/bin/dwt_finder.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use clap::Parser; use dtw_rs::{Algorithm, DynamicTimeWarping, ParameterizedAlgorithm}; diff --git a/tools/src/bin/flac_reader_tester.rs b/tools/src/bin/flac_reader_tester.rs index 007b383..6e65d5d 100644 --- a/tools/src/bin/flac_reader_tester.rs +++ b/tools/src/bin/flac_reader_tester.rs @@ -1,4 +1,19 @@ /* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ +/* This file compares a FLAC and WAV file and if the content is identical Also good to test if the FLAC and WAV read routines are good */ diff --git a/tools/src/bin/mid_channel_computing.rs b/tools/src/bin/mid_channel_computing.rs index 61d674b..fb746f6 100644 --- a/tools/src/bin/mid_channel_computing.rs +++ b/tools/src/bin/mid_channel_computing.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use std::fs::File; use clap::Parser; diff --git a/tools/src/bin/wav2wbro.rs b/tools/src/bin/wav2wbro.rs index 7b784f7..fdbaf0b 100644 --- a/tools/src/bin/wav2wbro.rs +++ b/tools/src/bin/wav2wbro.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use clap::{arg, command, Parser}; use log::debug; use std::fs::File; diff --git a/vsri/src/lib.rs b/vsri/src/lib.rs index 53529e6..854b700 100644 --- a/vsri/src/lib.rs +++ b/vsri/src/lib.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use chrono::{DateTime, Timelike, Utc}; use log::{debug, warn}; /// Very Small Rolo Index diff --git a/wavbrro/src/lib.rs b/wavbrro/src/lib.rs index ceca829..8513cf9 100644 --- a/wavbrro/src/lib.rs +++ b/wavbrro/src/lib.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ pub mod read; pub mod wavbrro; pub mod write; diff --git a/wavbrro/src/read.rs b/wavbrro/src/read.rs index 449de01..952f9ba 100644 --- a/wavbrro/src/read.rs +++ b/wavbrro/src/read.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use std::fs; use std::fs::File; use std::io::{self, Read, Seek, SeekFrom}; diff --git a/wavbrro/src/wavbrro.rs b/wavbrro/src/wavbrro.rs index a6caeed..df8fa96 100644 --- a/wavbrro/src/wavbrro.rs +++ b/wavbrro/src/wavbrro.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use rkyv::{Archive, Deserialize, Serialize}; use std::path::Path; use std::{error, fmt, io, result}; diff --git a/wavbrro/src/write.rs b/wavbrro/src/write.rs index ab284c7..737edf8 100644 --- a/wavbrro/src/write.rs +++ b/wavbrro/src/write.rs @@ -1,3 +1,18 @@ +/* +Copyright 2024 Instaclustr + +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 + + https://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. +*/ use std::fs::File; use std::os::unix::prelude::FileExt; use std::path::Path;