Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Sys / System / IO / compression / Deflater.cs / 1 / Deflater.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // zlib.h -- interface of the 'zlib' general purpose compression library // version 1.2.1, November 17th, 2003 // // Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. // // // ==--== // Compression engine namespace System.IO.Compression { using System; using System.Diagnostics; internal class Deflater { private FastEncoder encoder; public Deflater(bool doGZip) { encoder = new FastEncoder(doGZip); } public void SetInput(byte[] input, int startIndex, int count) { encoder.SetInput(input, startIndex, count); } public int GetDeflateOutput(byte[] output) { Debug.Assert(output != null, "Can't pass in a null output buffer!"); return encoder.GetCompressedOutput(output); } public bool NeedsInput() { return encoder.NeedsInput(); } public int Finish(byte[] output) { Debug.Assert(output != null, "Can't pass in a null output buffer!"); return encoder.Finish(output); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlParameterCollection.cs
- RoleServiceManager.cs
- BaseTreeIterator.cs
- ExpandCollapseProviderWrapper.cs
- RuleSetDialog.cs
- Package.cs
- DataGridViewEditingControlShowingEventArgs.cs
- AdornedElementPlaceholder.cs
- WeakRefEnumerator.cs
- SqlDataReader.cs
- CfgParser.cs
- ProviderSettingsCollection.cs
- WebPartCloseVerb.cs
- TemplateManager.cs
- AssemblyUtil.cs
- CollectionBase.cs
- Console.cs
- XmlC14NWriter.cs
- NativeMethods.cs
- ConfigurationErrorsException.cs
- RSAOAEPKeyExchangeFormatter.cs
- InstancePersistenceCommandException.cs
- CommandManager.cs
- controlskin.cs
- TypedLocationWrapper.cs
- CodeAccessSecurityEngine.cs
- BadImageFormatException.cs
- ResourceDisplayNameAttribute.cs
- MsmqInputMessagePool.cs
- DataContractSerializer.cs
- FontUnit.cs
- ExpressionBuilder.cs
- DataGridViewCellConverter.cs
- DataGridViewToolTip.cs
- StorageMappingFragment.cs
- SearchForVirtualItemEventArgs.cs
- MinMaxParagraphWidth.cs
- AutomationEvent.cs
- LoadRetryHandler.cs
- ControlTemplate.cs
- ObjectSecurity.cs
- Win32PrintDialog.cs
- WebAdminConfigurationHelper.cs
- DesignerHierarchicalDataSourceView.cs
- TabletDeviceInfo.cs
- AgileSafeNativeMemoryHandle.cs
- DataBindingCollection.cs
- XmlLanguage.cs
- NamespaceTable.cs
- relpropertyhelper.cs
- EntityRecordInfo.cs
- ExpressionPrefixAttribute.cs
- BasicCommandTreeVisitor.cs
- ArgumentDirectionHelper.cs
- DataGridTemplateColumn.cs
- ActivityDesigner.cs
- SessionStateModule.cs
- TTSEngineProxy.cs
- ConfigurationPropertyCollection.cs
- AppDomainShutdownMonitor.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SpecularMaterial.cs
- DrawingContextDrawingContextWalker.cs
- TreeChangeInfo.cs
- XmlSchemaNotation.cs
- XmlDownloadManager.cs
- RecordBuilder.cs
- Variant.cs
- DeploymentSection.cs
- FlowDocumentScrollViewer.cs
- UnsafeNativeMethods.cs
- PresentationSource.cs
- DataGridViewTextBoxEditingControl.cs
- RegistrySecurity.cs
- DynamicExpression.cs
- ConditionalAttribute.cs
- DataGridViewDataErrorEventArgs.cs
- MissingSatelliteAssemblyException.cs
- OperandQuery.cs
- CreateUserErrorEventArgs.cs
- PointF.cs
- XmlCodeExporter.cs
- NodeFunctions.cs
- TreeIterators.cs
- BindToObject.cs
- ElapsedEventArgs.cs
- NotImplementedException.cs
- PeerPresenceInfo.cs
- NotImplementedException.cs
- AssemblyCacheEntry.cs
- ProcessHostServerConfig.cs
- XmlTypeAttribute.cs
- TextBox.cs
- CompositeDuplexBindingElementImporter.cs
- TrackingParameters.cs
- DiscoveryDefaults.cs
- RootProfilePropertySettingsCollection.cs
- BinaryParser.cs
- AtomMaterializer.cs
- Button.cs