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
- PolicyAssertionCollection.cs
- UndoManager.cs
- ConfigurationFileMap.cs
- DetailsViewDeleteEventArgs.cs
- Int32Storage.cs
- BindingManagerDataErrorEventArgs.cs
- WindowsSysHeader.cs
- MdiWindowListStrip.cs
- IfJoinedCondition.cs
- RenderCapability.cs
- NativeMethods.cs
- AssemblyLoader.cs
- SponsorHelper.cs
- CultureInfo.cs
- Reference.cs
- RichTextBoxAutomationPeer.cs
- MultiBindingExpression.cs
- ConfigUtil.cs
- RSAOAEPKeyExchangeFormatter.cs
- MimeMultiPart.cs
- OleDbParameterCollection.cs
- BufferModeSettings.cs
- ResourceProperty.cs
- ThrowHelper.cs
- OptimizerPatterns.cs
- HtmlProps.cs
- NativeMethods.cs
- XmlAnyElementAttribute.cs
- RoleServiceManager.cs
- WaitHandleCannotBeOpenedException.cs
- ConfigurationSectionCollection.cs
- CustomCategoryAttribute.cs
- FileEnumerator.cs
- SignedXmlDebugLog.cs
- SafeMemoryMappedFileHandle.cs
- DesignerExtenders.cs
- FilterQuery.cs
- RevocationPoint.cs
- HttpCapabilitiesEvaluator.cs
- DataSourceComponent.cs
- FontEmbeddingManager.cs
- SecuritySessionFilter.cs
- SoapReflectionImporter.cs
- ProxyWebPart.cs
- VirtualPathProvider.cs
- StreamingContext.cs
- IsolatedStorage.cs
- Pen.cs
- NativeMethods.cs
- ClassValidator.cs
- DragDeltaEventArgs.cs
- GenericArgumentsUpdater.cs
- CodeNamespaceImportCollection.cs
- DateTimeFormatInfoScanner.cs
- EmptyStringExpandableObjectConverter.cs
- BooleanSwitch.cs
- StorageMappingItemLoader.cs
- DataGridItemAutomationPeer.cs
- ButtonPopupAdapter.cs
- ClientScriptManager.cs
- XmlSchemaImport.cs
- GlobalizationSection.cs
- ClipboardProcessor.cs
- EmptyEnumerator.cs
- TextMetrics.cs
- ApplicationHost.cs
- TraceInternal.cs
- Adorner.cs
- OdbcConnectionStringbuilder.cs
- BaseHashHelper.cs
- ValueTypeFixupInfo.cs
- Triplet.cs
- WebPartMovingEventArgs.cs
- Stroke2.cs
- AssociationType.cs
- ScrollChrome.cs
- ToolStripItem.cs
- SqlRemoveConstantOrderBy.cs
- ToolStripStatusLabel.cs
- FontStretch.cs
- SiteMapNodeItem.cs
- WithStatement.cs
- UntypedNullExpression.cs
- DataTemplateSelector.cs
- CancellationScope.cs
- X509CertificateChain.cs
- RecommendedAsConfigurableAttribute.cs
- XmlnsPrefixAttribute.cs
- CommandSet.cs
- CacheHelper.cs
- ResourceSetExpression.cs
- MaskedTextBoxTextEditorDropDown.cs
- VirtualizedContainerService.cs
- RawUIStateInputReport.cs
- PropertyTabChangedEvent.cs
- MimeMapping.cs
- ProtectedUri.cs
- ResourcePermissionBaseEntry.cs
- DispatcherHooks.cs
- SmtpFailedRecipientsException.cs