/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
nsCOMPtr<nsIOutputStream> compress = new SnappyCompressOutputStream(pipeWriter); return compress.forget();
}
// Verify the given number of bytes compresses to a smaller number of bytes. staticvoid TestCompress(uint32_t aNumBytes) { // Don't permit this test on small data sizes as snappy can slightly // bloat very small content.
ASSERT_GT(aNumBytes, 1024u);
// Verify that the given number of bytes can be compressed and uncompressed // successfully. staticvoid TestCompressUncompress(uint32_t aNumBytes) {
nsCOMPtr<nsIInputStream> pipeReader;
nsCOMPtr<nsIOutputStream> compress = CompressPipe(getter_AddRefs(pipeReader));
ASSERT_TRUE(compress);
nsCOMPtr<nsIInputStream> uncompress = new SnappyUncompressInputStream(pipeReader);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.