1. A method for outputting data based on anomaly detection, comprising: receiving, using a hardware processor, an input dataset; identifying commonly occurring grams in the input dataset that substantially include distinct byte values; creating an input subset by removing the identified grams from the input dataset; determining whether the input dataset is likely to be anomalous based on the identified grams, and determining whether the input dataset is likely to be anomalous by applying the input subset to a binary anomaly detection model to check for an n-gram in the input subset, wherein the binary detection model is represented using a Bloom filter; and outputting the input dataset based on the likelihood that the input dataset is anomalous.