Skip to content

Commit

Permalink
issue-107, LICENSE file was added to repo, comment with the License w…
Browse files Browse the repository at this point in the history
…as added to all source-code files
  • Loading branch information
testisnullus committed Aug 26, 2024
1 parent a29a36a commit 73c7da9
Show file tree
Hide file tree
Showing 42 changed files with 615 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target
*.flac
.vscode/settings.json

.idea
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 15 additions & 0 deletions brro-compressor/benches/fft_bench.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/benches/polynomial_bench.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/compare.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/compressor/constant.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/compressor/fft.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/compressor/mod.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/compressor/noop.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/compressor/polynomial.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/data.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/frame/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/header.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/main.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/optimizer/mod.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/optimizer/utils.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/types/metric_tag.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
15 changes: 15 additions & 0 deletions brro-compressor/src/utils/error.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
15 changes: 15 additions & 0 deletions brro-compressor/src/utils/readers/bro_reader.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit 73c7da9

Please sign in to comment.