Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Sys / System / IO / compression / DeflateInput.cs / 1305376 / DeflateInput.cs
namespace System.IO.Compression { using System.Diagnostics; internal class DeflateInput { private byte[] buffer; private int count; private int startIndex; internal byte[] Buffer { get { return buffer; } set { buffer = value; } } internal int Count { get { return count; } set { count = value; } } internal int StartIndex { get { return startIndex; } set { startIndex = value; } } internal void ConsumeBytes(int n) { Debug.Assert(n <= count, "Should use more bytes than what we have in the buffer"); startIndex += n; count -= n; Debug.Assert(startIndex + count <= buffer.Length, "Input buffer is in invalid state!"); } internal InputState DumpState() { InputState savedState; savedState.count = count; savedState.startIndex = startIndex; return savedState; } internal void RestoreState(InputState state) { count = state.count; startIndex = state.startIndex; } internal struct InputState { internal int count; internal int startIndex; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.IO.Compression { using System.Diagnostics; internal class DeflateInput { private byte[] buffer; private int count; private int startIndex; internal byte[] Buffer { get { return buffer; } set { buffer = value; } } internal int Count { get { return count; } set { count = value; } } internal int StartIndex { get { return startIndex; } set { startIndex = value; } } internal void ConsumeBytes(int n) { Debug.Assert(n <= count, "Should use more bytes than what we have in the buffer"); startIndex += n; count -= n; Debug.Assert(startIndex + count <= buffer.Length, "Input buffer is in invalid state!"); } internal InputState DumpState() { InputState savedState; savedState.count = count; savedState.startIndex = startIndex; return savedState; } internal void RestoreState(InputState state) { count = state.count; startIndex = state.startIndex; } internal struct InputState { internal int count; internal int startIndex; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageListImage.cs
- BitmapEffectGeneralTransform.cs
- MaskDescriptor.cs
- StreamMarshaler.cs
- SqlMethodCallConverter.cs
- SourceInterpreter.cs
- Int32Rect.cs
- OrElse.cs
- DataGridTextBoxColumn.cs
- SamlConditions.cs
- PlainXmlSerializer.cs
- ObjectPersistData.cs
- SqlConnectionHelper.cs
- SQLDecimalStorage.cs
- Stylesheet.cs
- SpecialFolderEnumConverter.cs
- SmtpMail.cs
- CodeLinePragma.cs
- Invariant.cs
- TransactionScope.cs
- Merger.cs
- DataSourceView.cs
- Freezable.cs
- DEREncoding.cs
- PackagePart.cs
- ComplexType.cs
- RectAnimationClockResource.cs
- TextRunCacheImp.cs
- CollectionConverter.cs
- HMACSHA384.cs
- EventLogPermissionEntry.cs
- ListViewUpdatedEventArgs.cs
- SubMenuStyleCollection.cs
- SchemaInfo.cs
- NamespaceEmitter.cs
- RoutingConfiguration.cs
- ActivityDesigner.cs
- ActivityStatusChangeEventArgs.cs
- EnumUnknown.cs
- LinkLabelLinkClickedEvent.cs
- ServicePointManagerElement.cs
- KeyValueConfigurationElement.cs
- ToolStripControlHost.cs
- PageBuildProvider.cs
- DbProviderManifest.cs
- ResolveNameEventArgs.cs
- AuthorizationSection.cs
- TableRow.cs
- RawStylusInputCustomData.cs
- SqlVersion.cs
- ClientRuntimeConfig.cs
- DescendantBaseQuery.cs
- IPHostEntry.cs
- CqlParser.cs
- SQLUtility.cs
- BindingSource.cs
- DatePickerDateValidationErrorEventArgs.cs
- CryptoConfig.cs
- PropertyMetadata.cs
- ThousandthOfEmRealPoints.cs
- RangeBase.cs
- BridgeDataReader.cs
- SafeBitVector32.cs
- XDeferredAxisSource.cs
- Config.cs
- XmlSchemaImporter.cs
- ResourceReferenceKeyNotFoundException.cs
- HebrewNumber.cs
- FixedSOMPageConstructor.cs
- StreamInfo.cs
- ControlCollection.cs
- SevenBitStream.cs
- SettingsBindableAttribute.cs
- ListViewInsertedEventArgs.cs
- SqlProcedureAttribute.cs
- RequestQueue.cs
- ContextBase.cs
- AncestorChangedEventArgs.cs
- RegexMatchCollection.cs
- DiscoveryOperationContext.cs
- HttpListenerRequestTraceRecord.cs
- ObjectDataSourceSelectingEventArgs.cs
- WebPartConnectionsDisconnectVerb.cs
- panel.cs
- DataTableMapping.cs
- HttpHeaderCollection.cs
- BitmapEffectrendercontext.cs
- mactripleDES.cs
- X509Extension.cs
- HandleTable.cs
- IsolatedStorageFileStream.cs
- DiffuseMaterial.cs
- PropertyIDSet.cs
- PeerIPHelper.cs
- ArrayList.cs
- ToolboxDataAttribute.cs
- DataGridViewBand.cs
- FontConverter.cs
- BinaryFormatterWriter.cs
- ComboBoxItem.cs